Skip to content
Snippets Groups Projects
Commit aa34b3ed authored by vahrenkamp's avatar vahrenkamp
Browse files

add type name in clone method

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@725 042f3d55-54a8-47e9-b7fb-15903f145c44
parent 186d29d9
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,9 @@ RobotFactory::~RobotFactory()
}
RobotPtr RobotFactory::createRobot( const std::string &name )
RobotPtr RobotFactory::createRobot(const std::string &name, const std::string &type)
{
RobotPtr result(new LocalRobot(name));
RobotPtr result(new LocalRobot(name, type));
return result;
}
......@@ -243,7 +243,7 @@ RobotPtr RobotFactory::cloneChangeStructure(RobotPtr robot, robotStructureDef &n
}
std::map<std::string, RobotNodePtr> newNodes;
RobotPtr newRobot = createRobot(robot->getName());
RobotPtr newRobot = createRobot(robot->getName(), robot->getType() + "_restructured_" + newStructure.rootName);
RobotNodePtr rn = robot->getRobotNode(newStructure.rootName);
rn = rn->clone(newRobot, false);
newNodes[newStructure.rootName] = rn;
......
......@@ -42,7 +42,7 @@ public:
/*!
Creates an empty robot.
*/
static RobotPtr createRobot(const std::string &name);
static RobotPtr createRobot(const std::string &name, const std::string &type = "");
/*!
Initializes Robot and all RobotNodes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment