Commit 53c2012d authored by David Flavigne's avatar David Flavigne
Browse files

2007/11/19

	Remove reference to kwsPlusRoadmap.
parent ab76611e
2007/11/19
Remove reference to kwsPlusRoadmap.
2007/11/08
Removed implementation of methods that have disappeared from the ChppBody.
......
......@@ -266,33 +266,7 @@ class ChppPlanner {
/**
*@}*
*/
/**
\name Drawing the roadmap
@{
*/
/**
\brief Draws the roadmap of given problem in interface.
\param inProblemId the rank of the problem in vector.
Works only if the roadmap builder of corresponding problem has been initialized with
a CkwsPlusRoadmap.
*/
ktStatus drawRoadmap(unsigned int inProblemId);
/**
\brief Stop drawing the roadmap of given problem in interface.
\param inProblemId the rank of the problem in vector.
Works only if the roadmap builder of corresponding problem has been initialized with
a CkwsPlusRoadmap.
*/
ktStatus stopdrawingRoadmap(unsigned int inProblemId);
/**
*@}*
*/
/**
\name Search functions
@{
......
......@@ -21,10 +21,8 @@ INCLUDE
#include "kcd2/kcdInterface.h"
#include "kwsKcd2/kwsKCDBody.h"
#include "kwsPlusRoadmap.h"
#include "KineoUtility/kitNotificator.h"
class CkwsPlusDrawRdmBuilderDelegate;
/*************************************
CLASS
......@@ -141,12 +139,12 @@ public:
\brief set roadmap.
\param inRoadmap shared pointer to a roadmap.
*/
void roadmap(CkwsPlusRoadmapShPtr inRoadmap) ;
void roadmap(CkwsRoadmapShPtr inRoadmap) ;
/**
\brief Get roadmap.
\return shared pointer to the roadmap.
*/
CkwsPlusRoadmapShPtr roadmap() const;
CkwsRoadmapShPtr roadmap() const;
/**
\brief Set pathOptimizer.
\param inPathOptimizer path optimizer.
......@@ -175,24 +173,6 @@ public:
*@}
*/
/**
\name Drawing the roadmap
@{
*/
/**
\brief Draws the roadmap by inserting a delegate in the roadmapBuilder
*/
ktStatus drawRoadmap();
/**
\brief Stop drawing the roadmap
*/
ktStatus stopDrawingRoadmap();
/**
*@}
*/
private :
/**
......@@ -214,7 +194,7 @@ private :
/**
\brief Shared pointer to a roadmap associate to the robot
*/
CkwsPlusRoadmapShPtr attRoadmap ;
CkwsRoadmapShPtr attRoadmap ;
/**
\brief Shared pointer to a roadmapBuilder associate to the the robot and the roadMap
*/
......@@ -236,10 +216,6 @@ private :
*/
std::vector<CkwsPathShPtr> attPathVector;
/**
\brief Pointer to a drawing roadmap delegate.
*/
CkwsPlusDrawRdmBuilderDelegate* attDrawRoadmapDelegate;
public:
// for notification:
static const CkitNotification::TType ID_HPP_ADD_PATH;
......
......@@ -515,35 +515,6 @@ ktStatus ChppPlanner::addPath(unsigned int inProblemId, CkwsPathShPtr kwsPath)
// ==========================================================================
ktStatus ChppPlanner::drawRoadmap(unsigned int inProblemId)
{
if (inProblemId >= hppProblemVector.size()) {
cerr << "ChppPlanner::drawRoadmap : inProblemId bigger than vector size." << endl;
return KD_ERROR;
}
ChppProblem& hppProblem = hppProblemVector[inProblemId];
if (hppProblem.drawRoadmap() == KD_ERROR) {
return KD_ERROR;
}
return KD_OK;
}
// ==========================================================================
ktStatus ChppPlanner::stopdrawingRoadmap(unsigned int inProblemId)
{
if (inProblemId >= hppProblemVector.size()) {
cerr << "ChppPlanner::drawRoadmap : inProblemId bigger than vector size." << endl;
return KD_ERROR;
}
ChppProblem& hppProblem = hppProblemVector[inProblemId];
hppProblem.stopDrawingRoadmap();
return KD_OK;
}
// ==========================================================================
ChppBodyConstShPtr ChppPlanner::findBodyByName(std::string inBodyName) const
{
ChppBodyConstShPtr hppBody;
......
......@@ -12,8 +12,6 @@
#include <iostream>
#include "kwsPlusDrawRdmBuilderDelegate.h"
#include "hppCore/hppProblem.h"
#include "hppModel/hppBody.h"
......@@ -31,7 +29,7 @@ const std::string ChppProblem::DEVICE_KEY("device");
ChppProblem::ChppProblem(CkppDeviceComponentShPtr inRobot) :
attNotificator(CkitNotificator::defaultNotificator()),
attRobot(inRobot), attDrawRoadmapDelegate(NULL)
attRobot(inRobot)
{
}
......@@ -40,7 +38,7 @@ ChppProblem::ChppProblem(CkppDeviceComponentShPtr inRobot) :
ChppProblem::ChppProblem(CkppDeviceComponentShPtr inRobot,
const std::vector<CkcdObjectShPtr>& inObstacleList) :
attNotificator(CkitNotificator::defaultNotificator()),
attRobot(inRobot), attDrawRoadmapDelegate(NULL)
attRobot(inRobot)
{
obstacleList(inObstacleList);
}
......@@ -227,14 +225,14 @@ CkwsRoadmapBuilderShPtr ChppProblem::roadmapBuilder() {
// ==========================================================================
CkwsPlusRoadmapShPtr ChppProblem::roadmap() const {
CkwsRoadmapShPtr ChppProblem::roadmap() const {
return attRoadmap ;
}
// ==========================================================================
void ChppProblem::roadmap(CkwsPlusRoadmapShPtr inRoadmap) {
void ChppProblem::roadmap(CkwsRoadmapShPtr inRoadmap) {
attRoadmap = inRoadmap ;
}
......@@ -252,26 +250,3 @@ CkwsPathOptimizerShPtr ChppProblem::pathOptimizer() {
return attPathOptimizer ;
}
ktStatus ChppProblem::drawRoadmap()
{
if (attDrawRoadmapDelegate != NULL) {
return KD_OK;
}
attDrawRoadmapDelegate = new CkwsPlusDrawRdmBuilderDelegate();
if (!attRoadmapBuilder) {
return KD_ERROR;
}
attRoadmapBuilder->addDelegate(attDrawRoadmapDelegate);
}
ktStatus ChppProblem::stopDrawingRoadmap()
{
if (attDrawRoadmapDelegate == NULL) {
return KD_OK;
}
if (!attRoadmapBuilder) {
return KD_OK;
}
return attRoadmapBuilder->removeDelegate(attDrawRoadmapDelegate);
}
Markdown is supported
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