29 #ifndef HPP_MANIPULATION_GRAPH_GRAPHCOMPONENT_HH
30 #define HPP_MANIPULATION_GRAPH_GRAPHCOMPONENT_HH
42 namespace manipulation {
56 const std::string&
name()
const;
59 const std::size_t&
id()
const {
return id_; }
101 void solveLevelByLevel(
bool solveLevelByLevel) {
102 solveLevelByLevel_ = solveLevelByLevel;
111 void init(
const GraphComponentWkPtr_t& weak);
114 : isInit_(false), name_(name), id_(-1), solveLevelByLevel_(false) {}
128 virtual std::ostream&
print(std::ostream& os)
const;
140 GraphComponentWkPtr_t wkPtr_;
144 bool solveLevelByLevel_;
Define common methods of the graph components.
Definition: graph-component.hh:51
virtual std::ostream & dotPrint(std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
Print the component in DOT language.
bool solveLevelByLevel() const
Definition: graph-component.hh:107
NumericalConstraints_t numericalCosts_
Stores the numerical costs.
Definition: graph-component.hh:119
void throwIfNotInitialized() const
void init(const GraphComponentWkPtr_t &weak)
Initialize the component.
const std::string & name() const
Get the component name.
virtual void initialize()=0
GraphPtr_t parentGraph() const
Set the parent graph.
GraphComponent(const std::string &name)
Definition: graph-component.hh:113
virtual void populateTooltip(dot::Tooltip &tp) const
Populate DrawingAttributes tooltip.
NumericalConstraints_t numericalConstraints_
Stores the numerical constraints.
Definition: graph-component.hh:117
virtual std::ostream & print(std::ostream &os) const
Print the object in a stream.
void setDirty() HPP_MANIPULATION_DEPRECATED
GraphWkPtr_t graph_
A weak pointer to the parent graph.
Definition: graph-component.hh:121
virtual ~GraphComponent()
Definition: graph-component.hh:53
const NumericalConstraints_t & numericalCosts() const
Get a reference to the NumericalConstraints_t.
bool insertNumericalConstraints(ConfigProjectorPtr_t &proj) const
const std::size_t & id() const
Return the component id.
Definition: graph-component.hh:59
virtual void invalidate()
Definition: graph-component.hh:93
friend std::ostream & operator<<(std::ostream &, const GraphComponent &)
virtual void addNumericalCost(const ImplicitPtr_t &numCost)
Add a cost function Implicit to the component.
void parentGraph(const GraphWkPtr_t &parent)
Set the parent graph.
const NumericalConstraints_t & numericalConstraints() const
Get a reference to the NumericalConstraints_t.
virtual void addNumericalConstraint(const ImplicitPtr_t &numConstraint)
Add constraint to the component.
bool isInit_
Definition: graph-component.hh:123
virtual void resetNumericalConstraints()
Reset the numerical constraints stored in the component.
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
std::ostream & operator<<(std::ostream &os, const GraphComponent &graphComp)
hpp::core::NumericalConstraints_t NumericalConstraints_t
Definition: fwd.hh:64
StateHistogram NodeHistogram HPP_MANIPULATION_DEPRECATED
Definition: statistics.hh:206
shared_ptr< Graph > GraphPtr_t
Definition: fwd.hh:47
constraints::ImplicitPtr_t ImplicitPtr_t
Definition: fwd.hh:116
core::ConfigProjectorPtr_t ConfigProjectorPtr_t
Definition: fwd.hh:121