diff --git a/include/hpp/manipulation/graph/edge.hh b/include/hpp/manipulation/graph/edge.hh index ad53938862435b4584b60e673a26677de624b36c..06b1855634bf23d271d0debb6679af20a51160e9 100644 --- a/include/hpp/manipulation/graph/edge.hh +++ b/include/hpp/manipulation/graph/edge.hh @@ -102,6 +102,10 @@ namespace hpp { /// Print the object in a stream. virtual std::ostream& dotPrint (std::ostream& os, dot::DrawingAttributes da = dot::DrawingAttributes ()) const; + /// Constraint to project onto the same leaf as config. + /// \return The initialized projector. + ConstraintSetPtr_t configConstraint() const; + protected: /// Initialization of the object. void init (const EdgeWkPtr_t& weak, const GraphWkPtr_t& graph, const NodeWkPtr_t& from, @@ -111,10 +115,6 @@ namespace hpp { Edge (const std::string& name, const core::SteeringMethodPtr_t& steeringMethod); - /// Constraint to project onto the same leaf as config. - /// \return The initialized projector. - ConstraintSetPtr_t configConstraint() const; - /// Constraint to project a path. /// \return The initialized constraint. ConstraintSetPtr_t pathConstraint() const; diff --git a/include/hpp/manipulation/graph/graph-component.hh b/include/hpp/manipulation/graph/graph-component.hh index 4e6d9074ef0db227e1ca9a7eaa0bb8af4be51579..9a5a373aeacbf019c683fdb466d851f39738e20e 100644 --- a/include/hpp/manipulation/graph/graph-component.hh +++ b/include/hpp/manipulation/graph/graph-component.hh @@ -91,6 +91,9 @@ namespace hpp { /// Set the parent graph. void parentGraph(const GraphWkPtr_t& parent); + /// Set the parent graph. + GraphPtr_t parentGraph() const; + /// Print the component in DOT language. virtual std::ostream& dotPrint (std::ostream& os, dot::DrawingAttributes da = dot::DrawingAttributes ()) const; diff --git a/src/graph/graph-component.cc b/src/graph/graph-component.cc index 405462f54fd732577f4b6168e89ae40177b51510..b7b92cd30068dfb3c157539faa6aed8e50a8f4d9 100644 --- a/src/graph/graph-component.cc +++ b/src/graph/graph-component.cc @@ -117,6 +117,11 @@ namespace hpp { return lockedJoints_; } + GraphPtr_t GraphComponent::parentGraph() const + { + return graph_.lock (); + } + void GraphComponent::parentGraph(const GraphWkPtr_t& parent) { graph_ = parent;