otsdaq  v2_00_00
ConvertFromXML.h
1 #ifndef ots_ConvertFromXML_h
2 #define ots_ConvertFromXML_h
3 
4 #include <xercesc/util/XMLChar.hpp>
5 #include <string>
6 
7 namespace ots
8 {
9 
11 {
12 public :
13  ConvertFromXML(const XMLCh* const toTranscode);
14  ~ConvertFromXML();
15 
16  const char* toConstChar(void) const;
17  char* toChar (void) const;
18  std::string toString (void) const;
19 
20 private :
21  char* xmlTranscoded_;
22 };
23 
24 #define XML_TO_CONST_CHAR(xml) ConvertFromXML(xml).toConstChar()
25 #define XML_TO_CHAR(xml) ConvertFromXML(xml).toChar()
26 #define XML_TO_STRING(xml) ConvertFromXML(xml).toString()
27 
28 }
29 
30 #endif