summaryrefslogtreecommitdiff
path: root/modules/CIAO/tools/XML/XercesString.h
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-11-10 20:33:31 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-11-10 20:33:31 +0000
commitf1790ce045fad390af2c69b2c25f714705c90b66 (patch)
tree45261f5f605e6cf33789427f838cc87599dbc485 /modules/CIAO/tools/XML/XercesString.h
parent0e7e7420693d452ba049b31217a915c2c52da1fe (diff)
downloadATCD-test_branch_one.tar.gz
branching/taggingtest_branch_one
Diffstat (limited to 'modules/CIAO/tools/XML/XercesString.h')
-rw-r--r--modules/CIAO/tools/XML/XercesString.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/modules/CIAO/tools/XML/XercesString.h b/modules/CIAO/tools/XML/XercesString.h
new file mode 100644
index 00000000000..b0975462c59
--- /dev/null
+++ b/modules/CIAO/tools/XML/XercesString.h
@@ -0,0 +1,78 @@
+// $Id$
+
+#ifndef _XERCESSTRING_H
+#define _XERCESSTRING_H
+
+#include /**/ "ace/pre.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include <iosfwd>
+
+#ifdef __BORLANDC__
+using std::memcpy;
+#endif
+
+#include <xercesc/util/XMLString.hpp>
+
+// Utility class that provides a std::string like facade to XMLString.
+// Doesn't implement all of the methods of std::string.
+#include "XML/CIAO_XML_Utils_Export.h"
+
+namespace CIAO
+{
+ namespace XML
+ {
+ class CIAO_XML_Utils_Export XStr
+ {
+ public:
+ XStr() : _wstr(0L) { };
+
+ XStr (const ACE_TCHAR* str);
+
+ XStr (XMLCh* wstr);
+
+ XStr (const XMLCh* wstr);
+
+ XStr (const XStr& copy);
+
+ XStr& operator= (const XStr& rhs);
+
+ ~XStr();
+
+ const XMLCh* begin() const;
+
+ const XMLCh* end() const;
+
+ bool append(const XMLCh* tail);
+
+ bool erase (const XMLCh* head, const XMLCh* tail);
+
+ int size() const;
+
+ XMLCh operator [] (const int i);
+
+ XMLCh operator [] (const int i) const;
+
+ operator const XMLCh* () const { return _wstr; };
+
+ XMLCh * release (void);
+ private:
+
+ XMLCh* _wstr; // Internal representation
+
+ };
+
+ CIAO_XML_Utils_Export bool operator== (const XStr& lhs, const XStr& rhs);
+ CIAO_XML_Utils_Export bool operator!= (const XStr& lhs, const XStr& rhs);
+
+ CIAO_XML_Utils_Export std::ostream&
+ operator<< (std::ostream& o, XStr const& str);
+
+ }
+}
+#include /**/ "ace/post.h"
+
+#endif /* _XERCESSTRING_H */