10 #include <mrpt/core/format.h> 21 using namespace mvsim;
29 static bool done =
false;
51 sName =
string(class_name);
55 if (0 != strcmp(root->
name(),
"element"))
57 "[WorldElementBase::factory] XML root element is '%s' " 58 "('<element>' expected)",
63 if (!attrib_class || !attrib_class->
value())
65 "[WorldElementBase::factory] Missing mandatory attribute " 66 "'class' in node <element>");
74 "[WorldElementBase::factory] Unknown world element type '%s'",
This file contains rapidxml parser and DOM implementation.
static Ptr factory(World *parent, const rapidxml::xml_node< char > *xml_node, const char *class_name=nullptr)
TClassFactory_worldElements classFactory_worldElements
#define REGISTER_WORLD_ELEMENT(TEXTUAL_NAME, CLASS_NAME)
std::shared_ptr< WorldElementBase > Ptr
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Ptr create(const std::string &class_name, ARG1 a1) const
GLsizei const GLcharARB ** string
void register_all_world_elements()
This file contains rapidxml printer implementation.