summaryrefslogtreecommitdiff
path: root/modules/CIAO/tools/Config_Handlers/Utils/XercesString.h
diff options
context:
space:
mode:
authorjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
committerjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
commitb71531b42b3325fd6079a7039aae8641262c8adf (patch)
treea5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/tools/Config_Handlers/Utils/XercesString.h
parenta0f67cc97c0050d907145e312135b60c0125e56e (diff)
downloadATCD-b71531b42b3325fd6079a7039aae8641262c8adf.tar.gz
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/tools/Config_Handlers/Utils/XercesString.h')
-rw-r--r--modules/CIAO/tools/Config_Handlers/Utils/XercesString.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/modules/CIAO/tools/Config_Handlers/Utils/XercesString.h b/modules/CIAO/tools/Config_Handlers/Utils/XercesString.h
new file mode 100644
index 00000000000..a6f1dabe1db
--- /dev/null
+++ b/modules/CIAO/tools/Config_Handlers/Utils/XercesString.h
@@ -0,0 +1,75 @@
+// $Id$
+
+#ifndef _XERCESSTRING_H
+#define _XERCESSTRING_H
+
+#include /**/ "ace/pre.h"
+
+#include "ace/Swap.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include <iosfwd>
+
+#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 "CIAO_XML_Utils_Export.h"
+namespace CIAO
+{
+namespace Config_Handlers
+{
+
+ class CIAO_XML_Utils_Export XStr
+ {
+ public:
+ XStr() : _wstr(0L) { };
+
+ XStr (const char* 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; };
+
+ 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 */