00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 #if !defined(QNAME_HPP)
00119 #define QNAME_HPP
00120
00121 #include <xercesc/util/XMLString.hpp>
00122 #include <xercesc/util/XMLUniDefs.hpp>
00123 #include <xercesc/util/XMemory.hpp>
00124 #include <xercesc/util/PlatformUtils.hpp>
00125
00126 #include <xercesc/internal/XSerializable.hpp>
00127
00128 XERCES_CPP_NAMESPACE_BEGIN
00129
00130 class QName : public XSerializable, public XMemory
00131 {
00132 public :
00133
00134
00135
00137 QName(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
00138
00140 QName
00141 (
00142 const XMLCh* const prefix
00143 , const XMLCh* const localPart
00144 , const unsigned int uriId
00145 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00146 );
00147
00149 QName
00150 (
00151 const XMLCh* const rawName
00152 , const unsigned int uriId
00153 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00154 );
00155
00157 QName(const QName& qname);
00158
00159 ~QName();
00160
00161
00162
00163
00164 const XMLCh* getPrefix() const;
00165 XMLCh* getPrefix();
00166
00167 const XMLCh* getLocalPart() const;
00168 XMLCh* getLocalPart();
00169
00170 unsigned int getURI() const;
00171
00172 const XMLCh* getRawName() const;
00173 XMLCh* getRawName();
00174
00175 MemoryManager* getMemoryManager() const;
00176
00177
00178
00179
00180 void setName
00181 (
00182 const XMLCh* const prefix
00183 , const XMLCh* const localPart
00184 , const unsigned int uriId
00185 );
00186
00187 void setName
00188 (
00189 const XMLCh* const rawName
00190 , const unsigned int uriId
00191 );
00192
00193 void setPrefix(const XMLCh*) ;
00194 void setLocalPart(const XMLCh*) ;
00195 void setNPrefix(const XMLCh*, const unsigned int) ;
00196 void setNLocalPart(const XMLCh*, const unsigned int) ;
00197 void setURI(const unsigned int) ;
00198
00199 void setValues(const QName& qname);
00200
00201
00202
00203
00204 bool operator==(const QName&) const;
00205
00206
00207
00208
00209 void cleanUp();
00210
00211
00212
00213
00214 DECL_XSERIALIZABLE(QName)
00215
00216 private :
00217
00218
00219
00220 QName& operator=(const QName&);
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250 MemoryManager* fMemoryManager;
00251 XMLCh* fPrefix;
00252 unsigned int fPrefixBufSz;
00253 XMLCh* fLocalPart;
00254 unsigned int fLocalPartBufSz;
00255 XMLCh* fRawName;
00256 unsigned int fRawNameBufSz;
00257 unsigned int fURIId;
00258 };
00259
00260
00261
00262
00263 inline const XMLCh* QName::getPrefix() const
00264 {
00265 return fPrefix;
00266 }
00267
00268 inline XMLCh* QName::getPrefix()
00269 {
00270 return fPrefix;
00271 }
00272
00273 inline const XMLCh* QName::getLocalPart() const
00274 {
00275 return fLocalPart;
00276 }
00277
00278 inline XMLCh* QName::getLocalPart()
00279 {
00280 return fLocalPart;
00281 }
00282
00283 inline unsigned int QName::getURI() const
00284 {
00285 return fURIId;
00286 }
00287
00288 inline MemoryManager* QName::getMemoryManager() const
00289 {
00290 return fMemoryManager;
00291 }
00292
00293
00294
00295
00296 inline void QName::setURI(const unsigned int uriId)
00297 {
00298 fURIId = uriId;
00299 }
00300
00301 XERCES_CPP_NAMESPACE_END
00302
00303 #endif