Go to the documentation of this file.
17 #ifndef GAZEBO_PHYSICS_ATMOSPHEREFACTORY_HH_
18 #define GAZEBO_PHYSICS_ATMOSPHEREFACTORY_HH_
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);\
Forward declarations for the common classes.
Definition: Animation.hh:26
static void RegisterAll()
Register everything.
static void RegisterAtmosphere(const std::string &_className, AtmosphereFactoryFn _factoryfn)
Register an atmosphere class.
default namespace for gazebo
The atmosphere factory instantiates different atmosphere models.
Definition: AtmosphereFactory.hh:39
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
static bool IsRegistered(const std::string &_name)
Check if an atmosphere model is registered.
static std::unique_ptr< Atmosphere > NewAtmosphere(const std::string &_className, World &_world)
Create a new instance of an atmosphere model.