From: <ro...@us...> - 2009-05-30 09:46:30
|
Revision: 7748 http://playerstage.svn.sourceforge.net/playerstage/?rev=7748&view=rev Author: robotos Date: 2009-05-30 09:46:23 +0000 (Sat, 30 May 2009) Log Message: ----------- Convert some more controllers and make ifaces private Modified Paths: -------------- code/gazebo/trunk/server/controllers/Controller.hh code/gazebo/trunk/server/controllers/factory/Factory.cc code/gazebo/trunk/server/controllers/irarray/IR_Array.cc code/gazebo/trunk/server/controllers/opaque/CMakeLists.txt Modified: code/gazebo/trunk/server/controllers/Controller.hh =================================================================== --- code/gazebo/trunk/server/controllers/Controller.hh 2009-05-30 09:37:34 UTC (rev 7747) +++ code/gazebo/trunk/server/controllers/Controller.hh 2009-05-30 09:46:23 UTC (rev 7748) @@ -124,7 +124,7 @@ protected: double lastUpdate; /// \brief Array of all the iface for this controller - protected: std::vector<Iface*> ifaces; + private: std::vector<Iface*> ifaces; protected: std::vector<Param*> parameters; }; Modified: code/gazebo/trunk/server/controllers/factory/Factory.cc =================================================================== --- code/gazebo/trunk/server/controllers/factory/Factory.cc 2009-05-30 09:37:34 UTC (rev 7747) +++ code/gazebo/trunk/server/controllers/factory/Factory.cc 2009-05-30 09:46:23 UTC (rev 7748) @@ -66,10 +66,7 @@ // Load the controller void Factory::LoadChild(XMLConfigNode *node) { - this->factoryIface = dynamic_cast<FactoryIface*>(this->ifaces[0]); - - if (!this->factoryIface) - gzthrow("Factory controller requires a factoryIface"); + this->factoryIface = dynamic_cast<FactoryIface*>(this->GetIface("factory")); } //////////////////////////////////////////////////////////////////////////////// Modified: code/gazebo/trunk/server/controllers/irarray/IR_Array.cc =================================================================== --- code/gazebo/trunk/server/controllers/irarray/IR_Array.cc 2009-05-30 09:37:34 UTC (rev 7747) +++ code/gazebo/trunk/server/controllers/irarray/IR_Array.cc 2009-05-30 09:46:23 UTC (rev 7748) @@ -68,16 +68,7 @@ // Load the controller void IR_Array::LoadChild(XMLConfigNode *node) { - std::vector<Iface*>::iterator iter; - - for (iter = this->ifaces.begin(); iter != this->ifaces.end(); iter++) - { - if ((*iter)->GetType() == "irarray") - this->irIface = dynamic_cast<IRIface*>(*iter); - } - - if (!this->irIface) gzthrow("IR_Array controller requires a IRIface"); - + this->irIface = dynamic_cast<IRIface*>(this->GetIface("irarray")); } //////////////////////////////////////////////////////////////////////////////// Modified: code/gazebo/trunk/server/controllers/opaque/CMakeLists.txt =================================================================== --- code/gazebo/trunk/server/controllers/opaque/CMakeLists.txt 2009-05-30 09:37:34 UTC (rev 7747) +++ code/gazebo/trunk/server/controllers/opaque/CMakeLists.txt 2009-05-30 09:46:23 UTC (rev 7748) @@ -1,2 +1 @@ ADD_SUBDIRECTORY(jointforce) -ADD_SUBDIRECTORY(cannon) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |