Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / XML_Utils / XercesString.h
blob48bed5715c08d9c41370c84d13a9deced5a0904c
1 #ifndef _XERCESSTRING_H
2 #define _XERCESSTRING_H
4 #include /**/ "ace/pre.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
7 #pragma once
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #include <iosfwd>
12 #ifdef __BORLANDC__
13 using std::memcpy;
14 #endif
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"
22 namespace XML
24 class XML_Utils_Export XStr
26 public:
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);
32 #endif
34 XStr (XMLCh* wstr);
36 XStr (const XMLCh* wstr);
38 XStr (const XStr& copy);
40 XStr& operator= (const XStr& rhs);
42 ~XStr();
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);
52 int size() const;
54 XMLCh operator [] (const int i);
56 XMLCh operator [] (const int i) const;
58 operator const XMLCh* () const { return _wstr; };
60 XMLCh * release ();
62 /// Release the held string and free its memory.
63 void reset ();
64 private:
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 */