Commit 0f48d73f authored by florent's avatar florent
Browse files

Add kxml tags and call-back at creation of ChppPlanner object.

    * include/hpp/core/planner.hh,
    * src/hppPlanner.cpp: additional tags are declared by creating an object of
      type hpp::core::Parser.
parent 2dc77de3
...@@ -31,6 +31,12 @@ KIT_PREDEF_CLASS(CkwsConfigExtractor); ...@@ -31,6 +31,12 @@ KIT_PREDEF_CLASS(CkwsConfigExtractor);
KIT_PREDEF_CLASS(ChppPlanner); KIT_PREDEF_CLASS(ChppPlanner);
namespace hpp {
namespace core {
class Parser;
}
}
/************************************* /*************************************
CLASS CLASS
**************************************/ **************************************/
...@@ -421,6 +427,11 @@ private: ...@@ -421,6 +427,11 @@ private:
*/ */
CkwsPlusStopRdmBuilderDelegate* attStopRdmBuilderDelegate; CkwsPlusStopRdmBuilderDelegate* attStopRdmBuilderDelegate;
/**
\brief Parser specialization
*/
hpp::core::Parser* parser_;
// for notification. // for notification.
public: public:
static const CkitNotification::TType ID_HPP_ADD_ROBOT; static const CkitNotification::TType ID_HPP_ADD_ROBOT;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "hpp/core/planner.hh" #include "hpp/core/planner.hh"
#include "hpp/core/problem.hh" #include "hpp/core/problem.hh"
#include "hpp/core/parser.hh"
#include "humanoid-robot.hh" #include "humanoid-robot.hh"
#include "hppModel/hppBody.h" #include "hppModel/hppBody.h"
#include <hppModel/hppHumanoidRobot.h> #include <hppModel/hppHumanoidRobot.h>
...@@ -92,7 +93,7 @@ ChppPlanner::ChppPlanner() ...@@ -92,7 +93,7 @@ ChppPlanner::ChppPlanner()
attNotificator = CkitNotificator::defaultNotificator(); attNotificator = CkitNotificator::defaultNotificator();
attObstacleList.clear(); attObstacleList.clear();
attStopRdmBuilderDelegate = new CkwsPlusStopRdmBuilderDelegate; attStopRdmBuilderDelegate = new CkwsPlusStopRdmBuilderDelegate;
parser_ = new hpp::core::Parser();
} }
// ========================================================================== // ==========================================================================
...@@ -102,7 +103,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) : ...@@ -102,7 +103,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) :
hppProblemVector(inPlanner.hppProblemVector), hppProblemVector(inPlanner.hppProblemVector),
attObstacleList(inPlanner.attObstacleList), attObstacleList(inPlanner.attObstacleList),
attStopRdmBuilderDelegate attStopRdmBuilderDelegate
(new CkwsPlusStopRdmBuilderDelegate(*attStopRdmBuilderDelegate)) (new CkwsPlusStopRdmBuilderDelegate(*attStopRdmBuilderDelegate)),
parser_(NULL)
{ {
} }
...@@ -112,6 +114,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) : ...@@ -112,6 +114,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) :
ChppPlanner::~ChppPlanner() ChppPlanner::~ChppPlanner()
{ {
delete attStopRdmBuilderDelegate; delete attStopRdmBuilderDelegate;
if (parser_)
delete parser_;
} }
// ========================================================================== // ==========================================================================
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment