39 #ifndef OME_COMMON_XML_STRING_H 40 #define OME_COMMON_XML_STRING_H 46 #include <xercesc/util/XMLString.hpp> 88 wide(xercesc::XMLString::replicate(str))
90 assert(this->
wide != 0);
103 narrow(xercesc::XMLString::replicate(str)),
106 assert(this->
narrow != 0);
107 assert(this->
wide != 0);
119 narrow(xercesc::XMLString::replicate(str.c_str())),
122 assert(this->
narrow != 0);
123 assert(this->
wide != 0);
133 xercesc::XMLString::release(&
narrow);
135 xercesc::XMLString::release(&
wide);
144 operator const XMLCh *()
const 146 assert(this->
wide != 0);
157 operator ::std::string()
const 159 assert(this->
narrow != 0);
173 assert(this->
narrow != 0);
187 return this->
narrow != 0 && strcmp(this->
narrow, rhs) == 0;
199 return this->
narrow != 0 && strcmp(this->
narrow, rhs.c_str()) == 0;
224 return !(*
this == rhs);
236 return !(*
this == rhs);
248 return !(*
this == rhs);
287 inline ::std::ostream&
291 return os << static_cast<std::string>(
str);
298 #endif // OME_COMMON_XML_STRING_H XMLCh * wide
The XMLCh * string representation.
Definition: String.h:277
String(const char *str)
Construct a String from a NUL-terminated string.
Definition: String.h:102
inline ::std::string str() const
Get the String content as a std::string.
Definition: String.h:171
static char * transcode(const XMLCh *str)
Transcode UTF-16 string to UTF-8 string.
Definition: String.cpp:54
bool operator==(const char *rhs)
Compare a String for equality with a C string.
Definition: String.h:185
Open Microscopy Environment C++.
Definition: base64.h:48
String(std::string const &str)
Construct a String from a std::string.
Definition: String.h:118
bool operator!=(const char *rhs)
Compare a String for inequality with a C string.
Definition: String.h:222
String(const XMLCh *str)
Construct a String from an XMLCh * string.
Definition: String.h:86
Xerces string wrapper.
Definition: String.h:74
char * narrow
The char * string representation.
Definition: String.h:275
~String()
Destructor.
Definition: String.h:130
inline ::std::ostream & operator<<(::std::ostream &os, const String &str)
Output String to output stream.
Definition: String.h:288