12 #include <mrpt/core/bits_math.h> 13 #include <mrpt/core/format.h> 17 using namespace mvsim;
21 const std::string& xml_node_class)
const 23 map<string, TXMLData>::const_iterator it = m_classes.find(xml_node_class);
24 if (it == m_classes.end())
27 return it->second.xml_doc->first_node();
33 std::string* xml_node_class =
new std::string(input_xml_node_class);
35 char* input_str =
const_cast<char*
>(xml_node_class->c_str());
39 xml->
parse<0>(input_str);
47 "[XmlClassesRegistry] Missing XML node <%s>",
52 if (!att_name || !att_name->
value())
54 "[XmlClassesRegistry] Missing mandatory attribute " 55 "'name' in node <%s>",
58 const string sClassName = att_name->
value();
68 static_cast<long>(std::count(input_str, e.
where<
char>(),
'\n') + 1);
71 "[XmlClassesRegistry] XML parse error (Line %u): %s",
72 static_cast<unsigned>(line), e.
what()));
74 catch (
const std::exception&)
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
rapidxml::xml_document * xml_doc
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
virtual const char * what() const
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
const rapidxml::xml_node< char > * get(const std::string &xml_node_class) const
void add(const std::string &input_xml_node_class)