Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0f72ec239f
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 1.002 kb
#include "stage.hh"
using namespace Stg;
/* Create named wrappers for model constructors */
template <class T>
Model* Creator( World* world, Model* parent, const std::string& type )
return new T( world, parent, type );
static void Register( const std::string& type, creator_t func )
Model::name_map[type] = func;
/** Map model names to named constructors for each model type */
void Stg::RegisterModels()
// generic model
Register( "model", Creator<Model> );
Register( "actuator", Creator<ModelActuator> );
Register( "blinkenlight", Creator<ModelBlinkenlight> );
Register( "blobfinder", Creator<ModelBlobfinder> );
Register( "camera", Creator<ModelCamera> );
Register( "fiducial", Creator<ModelFiducial> );
Register( "gripper", Creator<ModelGripper> );
Register( "lightindicator", Creator<ModelLightIndicator> );
Register( "position", Creator<ModelPosition> );
Register( "ranger", Creator<ModelRanger> );
Jump to Line
Something went wrong with that request. Please try again.