typetable.cc
Go to the documentation of this file.
00001 #include "stage.hh"
00002 using namespace Stg;
00003 
00004 
00005 /* Create named wrappers for model constructors */
00006 template <class T>
00007 Model* Creator( World* world, Model* parent, const std::string& type )
00008 {
00009   return new T( world, parent, type );
00010 }
00011 
00012 static void Register( const std::string& type,
00013                                                                                         creator_t func )
00014 {
00015   Model::name_map[type] = func;  
00016 }
00017 
00019 void Stg::RegisterModels()
00020 {
00021   // generic model
00022   Register( "model", Creator<Model> );
00023   
00024   Register( "actuator", Creator<ModelActuator> );
00025   Register( "blinkenlight", Creator<ModelBlinkenlight> );
00026   Register( "blobfinder", Creator<ModelBlobfinder> );
00027   Register( "camera", Creator<ModelCamera> );
00028   Register( "fiducial", Creator<ModelFiducial> );
00029   Register( "gripper", Creator<ModelGripper> );
00030   Register( "lightindicator", Creator<ModelLightIndicator> );
00031   Register( "position", Creator<ModelPosition> );
00032   Register( "ranger",  Creator<ModelRanger> );
00033 }  
00034 


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Thu Aug 27 2015 15:20:57