Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XString.hpp
Go to the documentation of this file.
1 /*
2  * XString: a simple class for translation between
3  * XMLCh strings and local coding
4  *
5  * Class definition
6  * September 21, 2003
7  * Richard Jones
8  */
9 
10 #ifndef SAW_XSTRING_DEF
11 #define SAW_XSTRING_DEF true
12 
13 #include <xercesc/util/XercesDefs.hpp>
14 #include <xercesc/util/XMLString.hpp>
15 
16 #include <string>
17 #include <list>
18 
19 
20 class XString: public std::string
21 {
22 
23 /* The XString class extends the STL string class by adding
24  * unicode functionality required by the implementation of
25  * the Xerces xml library.
26  */
27  public :
28  XString(void);
29  XString(const XMLCh* const x);
30  XString(const char* const s);
31  XString(const std::string& str);
32  XString(const XString& X);
33  ~XString();
34 
35  const XString basename() const; // implements basename() from strings.h
36  const XMLCh* unicode_str(); // must modify the object because it
37  // has to keep track of memory usage.
38 
39  XString& operator=(const XString& src);
40 
41  private:
42  std::list<char*> fStringCollection;
43 
44  void dump();
45 };
46 
47 #endif
~XString()
Definition: XString.cpp:54
void dump()
Definition: XString.cpp:89
char str[256]
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39
char string[256]
const XMLCh * unicode_str()
Definition: XString.cpp:71
XString(void)
Definition: XString.cpp:15
#define X(str)
Definition: hddm-c.cpp:83
XString & operator=(const XString &src)
Definition: XString.cpp:65
std::list< char * > fStringCollection
Definition: XString.hpp:42
const XString basename() const
Definition: XString.cpp:78