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_; }
98 solveLevelByLevel_ = solveLevelByLevel;
107 void init(
const GraphComponentWkPtr_t& weak);
110 : isInit_(false), name_(name), id_(-1), solveLevelByLevel_(false) {}
124 virtual std::ostream&
print(std::ostream& os)
const;
136 GraphComponentWkPtr_t wkPtr_;
140 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:103
NumericalConstraints_t numericalCosts_
Stores the numerical costs.
Definition: graph-component.hh:115
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.
void solveLevelByLevel(bool solveLevelByLevel)
Definition: graph-component.hh:97
GraphComponent(const std::string &name)
Definition: graph-component.hh:109
virtual void populateTooltip(dot::Tooltip &tp) const
Populate DrawingAttributes tooltip.
NumericalConstraints_t numericalConstraints_
Stores the numerical constraints.
Definition: graph-component.hh:113
virtual std::ostream & print(std::ostream &os) const
Print the object in a stream.
GraphWkPtr_t graph_
A weak pointer to the parent graph.
Definition: graph-component.hh:117
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:119
virtual void resetNumericalConstraints()
Reset the numerical constraints stored in the component.
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:88
std::ostream & operator<<(std::ostream &os, const GraphComponent &graphComp)
hpp::core::NumericalConstraints_t NumericalConstraints_t
Definition: fwd.hh:64
shared_ptr< Graph > GraphPtr_t
Definition: fwd.hh:47
constraints::ImplicitPtr_t ImplicitPtr_t
Definition: fwd.hh:131
core::ConfigProjectorPtr_t ConfigProjectorPtr_t
Definition: fwd.hh:136