Gazebo logo

ModelFactory.hh File Reference

Go to the source code of this file.

Classes

class  ModelFactory
 The model factory; the class is just for namespacing purposes. More...
class  ModelFactory::ModelClass

Defines

#define GZ_REGISTER_STATIC(name, classname)
 Static model registration macro.
#define GZ_REGISTER_PLUGIN(name, classname)
 Plugin model registration macro.

Typedefs

typedef Model *(* ModelFactoryFn )(World *)


Define Documentation

#define GZ_REGISTER_STATIC name,
classname   ) 
 

Value:

Model *New##classname(World *world) \
{ \
  return new classname(world); \
} \
void Register##classname() \
{\
  ModelFactory::RegisterModel("static", name, New##classname);\
}
Static model registration macro.

Use this macro to register models with the server.

Parameters:
name Model type name, as it appears in the world file.
classname C++ class name for the model.

#define GZ_REGISTER_PLUGIN name,
classname   ) 
 

Value:

Model *New##classname(World *world) \
{ \
  return new classname(world); \
} \
extern "C" \
{ \
  int gazebo_plugin_init(void) \
  { \
    ModelFactory::RegisterModel("plugin", name, New##classname); \
    return 0;\
  }\
}
Plugin model registration macro.

Use this macro to register plugin models with the server.

Parameters:
name Model type name, as it appears in the world file.
classname C++ class name for the model.


Typedef Documentation

typedef Model*(* ModelFactoryFn)(World *)
 


Last updated 12 September 2005 21:38:45