16 #if MRPT_VERSION>=0x199 17 #include <mrpt/core/format.h> 19 #include <mrpt/utils/utils_defs.h> 26 using namespace mvsim;
34 static bool done =
false;
47 m_sensor_last_timestamp(0)
60 if (!root)
throw runtime_error(
"[SensorBase::factory] XML node is NULL");
61 if (0 != strcmp(root->
name(),
"sensor"))
64 "[SensorBase::factory] XML root element is '%s' ('sensor' " 70 if (!sensor_class || !sensor_class->
value())
72 "[VehicleBase::factory] Missing mandatory attribute 'class' in " 75 const string sName = string(sensor_class->
value());
83 "[SensorBase::factory] Unknown sensor type '%s'",
This file contains rapidxml parser and DOM implementation.
SensorBase(VehicleBase &vehicle)
CLASS * create(const std::string &class_name, ARG1 a1) const
void register_all_sensors()
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
virtual ~SensorBase()
which the sensor is attached.
TClassFactory_sensors classFactory_sensors
#define REGISTER_SENSOR(TEXTUAL_NAME, CLASS_NAME)
static SensorBase * factory(VehicleBase &parent, const rapidxml::xml_node< char > *xml_node)
This file contains rapidxml printer implementation.