1 #ifndef _XERCESSTRING_H
2 #define _XERCESSTRING_H
4 #include /**/ "ace/pre.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
16 #include <xercesc/util/XMLString.hpp>
18 // Utility class that provides a std::string like facade to XMLString.
19 // Doesn't implement all of the methods of std::string.
20 #include "XML_Utils_Export.h"
24 class XML_Utils_Export XStr
27 XStr() : _wstr(0L) { };
29 // On unicode windows, ACE_TCHAR == XMLCh
30 #if !defined (_MSC_VER) || !defined (ACE_USES_WCHAR)
31 XStr (const ACE_TCHAR
* str
);
36 XStr (const XMLCh
* wstr
);
38 XStr (const XStr
& copy
);
40 XStr
& operator= (const XStr
& rhs
);
44 const XMLCh
* begin() const;
46 const XMLCh
* end() const;
48 bool append(const XMLCh
* tail
);
50 bool erase (const XMLCh
* head
, const XMLCh
* tail
);
54 XMLCh
operator [] (const int i
);
56 XMLCh
operator [] (const int i
) const;
58 operator const XMLCh
* () const { return _wstr
; };
62 /// Release the held string and free its memory.
65 XMLCh
* _wstr
; // Internal representation
68 XML_Utils_Export
bool operator== (const XStr
& lhs
, const XStr
& rhs
);
69 XML_Utils_Export
bool operator!= (const XStr
& lhs
, const XStr
& rhs
);
71 XML_Utils_Export
std::ostream
&
72 operator<< (std::ostream
& o
, XStr
const& str
);
75 #include /**/ "ace/post.h"
77 #endif /* _XERCESSTRING_H */