39 #ifndef vpXmlParser_HH 40 #define vpXmlParser_HH 47 #include <visp3/core/vpConfig.h> 51 #include <visp3/core/vpException.h> 53 #include <libxml/parser.h> 196 virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node) = 0;
207 virtual void writeMainClass(xmlNodePtr node) = 0;
209 bool xmlReadBoolChild(xmlDocPtr doc, xmlNodePtr node);
210 char *xmlReadCharChild(xmlDocPtr doc, xmlNodePtr node);
211 double xmlReadDoubleChild(xmlDocPtr doc, xmlNodePtr node);
212 float xmlReadFloatChild(xmlDocPtr doc, xmlNodePtr node);
213 int xmlReadIntChild(xmlDocPtr doc, xmlNodePtr node);
214 std::string xmlReadStringChild(xmlDocPtr doc, xmlNodePtr node);
215 unsigned int xmlReadUnsignedIntChild(xmlDocPtr doc, xmlNodePtr node);
217 void xmlWriteBoolChild(xmlNodePtr node,
const char *label,
bool value);
218 void xmlWriteCharChild(xmlNodePtr node,
const char *label,
const char *value);
219 void xmlWriteDoubleChild(xmlNodePtr node,
const char *label,
double value);
220 void xmlWriteFloatChild(xmlNodePtr node,
const char *label,
float value);
221 void xmlWriteIntChild(xmlNodePtr node,
const char *label,
int value);
222 void xmlWriteStringChild(xmlNodePtr node,
const char *label,
const std::string &value);
223 void xmlWriteUnsignedIntChild(xmlNodePtr node,
const char *label,
unsigned int value);
244 void parse(
const std::string &filename);
245 void save(
const std::string &filename,
bool append =
false);
290 void setMap(
const std::map<std::string, int> &_map) { nodeMap = _map; }
299 inline void setMainTag(
const std::string &tag) { main_tag = tag; }
void setMainTag(const std::string &tag)
void setMap(const std::map< std::string, int > &_map)
std::map< std::string, int > nodeMap