23 #ifndef _PHYSICSFACTORY_HH_
24 #define _PHYSICSFACTORY_HH_
48 public:
static void RegisterAll();
54 public:
static void RegisterPhysicsEngine(std::string _className,
61 const std::string &_className,
WorldPtr _world);
66 public:
static bool IsRegistered(
const std::string &_name);
69 private:
static std::map<std::string, PhysicsFactoryFn> engines;
77 #define GZ_REGISTER_PHYSICS_ENGINE(name, classname) \
78 GAZEBO_VISIBLE PhysicsEnginePtr New##classname(WorldPtr _world) \
80 return PhysicsEnginePtr(new gazebo::physics::classname(_world)); \
83 void Register##classname() \
85 PhysicsFactory::RegisterPhysicsEngine(name, New##classname);\
PhysicsEnginePtr(* PhysicsFactoryFn)(WorldPtr world)
Definition: PhysicsFactory.hh:41
The physics factory instantiates different physics engines.
Definition: PhysicsFactory.hh:45
default namespace for gazebo
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:106
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:78
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48