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);
KIT_PREDEF_CLASS(ChppPlanner);
namespace hpp {
namespace core {
class Parser;
}
}
/*************************************
CLASS
**************************************/
......@@ -421,6 +427,11 @@ private:
*/
CkwsPlusStopRdmBuilderDelegate* attStopRdmBuilderDelegate;
/**
\brief Parser specialization
*/
hpp::core::Parser* parser_;
// for notification.
public:
static const CkitNotification::TType ID_HPP_ADD_ROBOT;
......
......@@ -21,6 +21,7 @@
#include "hpp/core/planner.hh"
#include "hpp/core/problem.hh"
#include "hpp/core/parser.hh"
#include "humanoid-robot.hh"
#include "hppModel/hppBody.h"
#include <hppModel/hppHumanoidRobot.h>
......@@ -92,7 +93,7 @@ ChppPlanner::ChppPlanner()
attNotificator = CkitNotificator::defaultNotificator();
attObstacleList.clear();
attStopRdmBuilderDelegate = new CkwsPlusStopRdmBuilderDelegate;
parser_ = new hpp::core::Parser();
}
// ==========================================================================
......@@ -102,7 +103,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) :
hppProblemVector(inPlanner.hppProblemVector),
attObstacleList(inPlanner.attObstacleList),
attStopRdmBuilderDelegate
(new CkwsPlusStopRdmBuilderDelegate(*attStopRdmBuilderDelegate))
(new CkwsPlusStopRdmBuilderDelegate(*attStopRdmBuilderDelegate)),
parser_(NULL)
{
}
......@@ -112,6 +114,8 @@ ChppPlanner::ChppPlanner(const ChppPlanner& inPlanner) :
ChppPlanner::~ChppPlanner()
{
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