17 #ifndef GAZEBO_PHYSICS_ATMOSPHEREFACTORY_HH_
18 #define GAZEBO_PHYSICS_ATMOSPHEREFACTORY_HH_
35 typedef std::unique_ptr<Atmosphere> (*AtmosphereFactoryFn) (
World &world);
42 public:
static void RegisterAll();
48 public:
static void RegisterAtmosphere(
const std::string &_className,
55 public:
static std::unique_ptr<Atmosphere> NewAtmosphere(
56 const std::string &_className,
World &_world);
61 public:
static bool IsRegistered(
const std::string &_name);
64 private:
static std::map<std::string, AtmosphereFactoryFn> models;
72 #define GZ_REGISTER_ATMOSPHERE_MODEL(_name, _classname) \
73 GZ_PHYSICS_VISIBLE std::unique_ptr<Atmosphere> \
74 New##_classname(World &_world) \
76 return std::unique_ptr<Atmosphere>( \
77 new gazebo::physics::_classname(_world)); \
80 void Register##_classname() \
82 AtmosphereFactory::RegisterAtmosphere(_name, New##_classname);\
default namespace for gazebo
The world provides access to all other object within a simulated environment.
Definition: World.hh:80
std::unique_ptr< Atmosphere >(* AtmosphereFactoryFn)(World &world)
Definition: AtmosphereFactory.hh:35
The atmosphere factory instantiates different atmosphere models.
Definition: AtmosphereFactory.hh:39