diff --git a/include/hpp/manipulation/graph/node.hh b/include/hpp/manipulation/graph/node.hh index 7e21f243a1b56125f43d90174459ba7b20f6a721..feb3ade493ceaf6ab20b62f9fb9be37247719534 100644 --- a/include/hpp/manipulation/graph/node.hh +++ b/include/hpp/manipulation/graph/node.hh @@ -98,40 +98,21 @@ namespace hpp { }; // class Node template <typename T> - static inline void insertListIn (const T& l, ConstraintSetPtr_t cs) + extern inline void insertListIn (const T& l, ConstraintSetPtr_t cs) { typename T::const_iterator it; for (it = l.begin(); it != l.end(); it++) cs->addConstraint (HPP_DYNAMIC_PTR_CAST(Constraint, *it)); } template <typename T> - static inline void insertListIn (const T& l, ConfigProjectorPtr_t cs) + extern inline void insertListIn (const T& l, ConfigProjectorPtr_t cs) { typename T::const_iterator it; for (it = l.begin(); it != l.end(); it++) cs->addConstraint (*it); } - static ConfigProjectorPtr_t buildConfigProjector (GraphWkPtr_t graph, const std::string& name) - { - GraphPtr_t g = graph.lock (); - if (!g) { - HPP_THROW_EXCEPTION(Bad_function_call, "Invalid weak_ptr to the Graph."); - } - - ConfigProjectorPtr_t ret = ConfigProjector:: - create(g->robot(), name, g->errorThreshold(), g->maxIterations()); - return ret; - } - static ConstraintSetPtr_t buildConstraintSet (GraphWkPtr_t graph, const std::string& name) - { - GraphPtr_t g = graph.lock (); - if (!g) { - HPP_THROW_EXCEPTION(Bad_function_call, "Invalid weak_ptr to the Graph."); - } - - ConstraintSetPtr_t ret = ConstraintSet::create(g->robot(), name); - return ret; - } + extern ConfigProjectorPtr_t buildConfigProjector (GraphWkPtr_t graph, const std::string& name); + extern ConstraintSetPtr_t buildConstraintSet (GraphWkPtr_t graph, const std::string& name); } // namespace graph } // namespace manipulation } // namespace hpp diff --git a/src/graph/node.cc b/src/graph/node.cc index 70a205d53e6aa0adbb12492d2aa5409bd8bd81e5..f51b4781afdc7f63b10f86f38842de64aad4f1b4 100644 --- a/src/graph/node.cc +++ b/src/graph/node.cc @@ -19,6 +19,29 @@ namespace hpp { namespace manipulation { namespace graph { + ConfigProjectorPtr_t buildConfigProjector (GraphWkPtr_t graph, const std::string& name) + { + GraphPtr_t g = graph.lock (); + if (!g) { + HPP_THROW_EXCEPTION(Bad_function_call, "Invalid weak_ptr to the Graph."); + } + + ConfigProjectorPtr_t ret = ConfigProjector:: + create(g->robot(), name, g->errorThreshold(), g->maxIterations()); + return ret; + } + + ConstraintSetPtr_t buildConstraintSet (GraphWkPtr_t graph, const std::string& name) + { + GraphPtr_t g = graph.lock (); + if (!g) { + HPP_THROW_EXCEPTION(Bad_function_call, "Invalid weak_ptr to the Graph."); + } + + ConstraintSetPtr_t ret = ConstraintSet::create(g->robot(), name); + return ret; + } + NodePtr_t Node::create () { Node* node = new Node;