00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _RTXCPPXMLSTRING_H_
00029 #define _RTXCPPXMLSTRING_H_
00030
00031 #include "rtxsrc/rtxCommon.h"
00032 #include "rtxsrc/rtxCppBaseType.h"
00033 #include "rtxsrc/rtxPrint.h"
00034
00039 class EXTERNRTX OSXMLStringClass : public OSXMLSTRING, public OSBaseType {
00040 public:
00045 OSXMLStringClass();
00046
00056 OSXMLStringClass (const OSUTF8CHAR* strval,
00057 OSBOOL cdata_ = FALSE,
00058 OSBOOL ownMemory = FALSE);
00059
00065 OSXMLStringClass (const OSXMLSTRING& str);
00066
00072 OSXMLStringClass (const OSXMLStringClass& str);
00073
00078 virtual ~OSXMLStringClass();
00079
00084 OSBaseType* clone () const { return new OSXMLStringClass (*this); }
00085
00093 void copyValue (const OSUTF8CHAR* utf8str);
00094
00102 inline void copyValue (const char* cstring) {
00103 copyValue ((const OSUTF8CHAR*) cstring);
00104 }
00105
00109 inline const char* c_str () const {
00110 return (const char*)value;
00111 }
00112
00116 inline const OSUTF8CHAR* getValue () const {
00117 return value;
00118 }
00119
00127 inline OSBOOL isCDATA () const { return cdata; }
00128
00136 inline void setCDATA (OSBOOL bvalue) { cdata = bvalue; }
00137
00143 inline void print (const char* name) { rtxPrintCharStr (name, value); }
00144
00152 void setValue (const OSUTF8CHAR* utf8str);
00153
00161 inline void setValue (const char* cstring) {
00162 setValue ((const OSUTF8CHAR*) cstring);
00163 }
00164
00168 OSXMLStringClass& operator= (const OSXMLStringClass& original);
00169
00173 inline int length () {
00174 return (value == 0) ? 0 : rtxUTF8Len(value);
00175 }
00176
00180 inline int size () {
00181 return (value == 0) ? 0 : rtxUTF8LenBytes(value);
00182 }
00183
00184 } ;
00185
00186 #endif