Isis 3 Programmer Reference
IsisXMLChTrans.h
Go to the documentation of this file.
1 
24 #ifndef IsisXMLChTrans_h
25 #define IsisXMLChTrans_h
26 
27 #include <string>
28 #include <iostream>
29 #include <cstdlib>
30 
31 namespace XERCES = XERCES_CPP_NAMESPACE;
32 
33 // This class converts from the internal XMLCh character format to simple c strings
34 
40 class XMLChTrans {
41  public :
42  // Constructors and Destructor
43  XMLChTrans(const XMLCh *const toTranscode) {
44  // Call the private transcoding method
45  fLocalForm = XERCES::XMLString::transcode(toTranscode);
46  }
47 
48  ~XMLChTrans() {
49  delete [] fLocalForm;
50  }
51 
52  // Getter methods
53  const char *localForm() const {
54  return fLocalForm;
55  }
56 
57  private :
58  char *fLocalForm;
59 };
60 
61 
62 inline std::ostream &operator<<(std::ostream &target, const XMLChTrans &toDump) {
63  target << toDump.localForm();
64  return target;
65 }
66 
67 #endif
QDebug operator<<(QDebug dbg, const Isis::Angle &angleToPrint)
Display an Angle for a debugging statement.
Definition: Angle.cpp:383