23 #ifndef _SENSORFACTORY_HH_
24 #define _SENSORFACTORY_HH_
41 typedef Sensor* (*SensorFactoryFn) ();
59 public:
static void RegisterAll();
64 public:
static void RegisterSensor(
const std::string &_className,
71 public:
static SensorPtr NewSensor(
const std::string &_className);
76 public:
static void GetSensorTypes(std::vector<std::string> &_types);
79 private:
static std::map<std::string, SensorFactoryFn> sensorMap;
88 #define GZ_REGISTER_STATIC_SENSOR(name, classname) \
89 GAZEBO_VISIBLE Sensor *New##classname() \
91 return new gazebo::sensors::classname(); \
94 void Register##classname() \
96 SensorFactory::RegisterSensor(name, New##classname);\
Sensor *(* SensorFactoryFn)()
Definition: SensorFactory.hh:41
Forward declarations and typedefs for sensors.
boost::shared_ptr< Sensor > SensorPtr
Definition: SensorTypes.hh:55
Base class for sensors.
Definition: Sensor.hh:67
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
Definition: SensorFactory.hh:47