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 #if !defined(XMLATTR_HPP)
00086 #define XMLATTR_HPP
00087
00088 #include <util/XMLString.hpp>
00089 #include <framework/XMLAttDef.hpp>
00090
00091
00113 class XMLAttr
00114 {
00115 public:
00116
00117
00118
00120
00121
00127 XMLAttr();
00128
00155 XMLAttr
00156 (
00157 const unsigned int uriId
00158 , const XMLCh* const attrName
00159 , const XMLCh* const attrPrefix
00160 , const XMLCh* const attrValue
00161 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00162 , const bool specified = true
00163 );
00164
00165
00167
00168 ~XMLAttr();
00169
00170
00171
00172
00173
00174
00175
00177
00178
00183 const XMLCh* getName() const;
00184
00189 const XMLCh* getPrefix() const;
00190
00196 const XMLCh* getQName() const;
00197
00202 bool getSpecified() const;
00203
00208 XMLAttDef::AttTypes getType() const;
00209
00215 const XMLCh* getValue() const;
00216
00221 unsigned int getURIId() const;
00222
00223
00224
00225
00226
00227
00228
00229
00231
00232
00260 void set
00261 (
00262 const unsigned int uriId
00263 , const XMLCh* const attrName
00264 , const XMLCh* const attrPrefix
00265 , const XMLCh* const attrValue
00266 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00267 );
00268
00283 void setName
00284 (
00285 const unsigned int uriId
00286 , const XMLCh* const attrName
00287 , const XMLCh* const attrPrefix
00288 );
00289
00297 void setSpecified(const bool newValue);
00298
00307 void setType(const XMLAttDef::AttTypes newType);
00308
00316 void setValue(const XMLCh* const newValue);
00317
00323 void setURIId(const unsigned int uriId);
00324
00325
00326
00327
00328
00329 private :
00330
00331
00332
00333 XMLAttr(const XMLAttr&);
00334 XMLAttr& operator=(const XMLAttr&);
00335
00336
00337
00338
00339
00340 void cleanUp();
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381 XMLCh* fName;
00382 unsigned int fNameBufSz;
00383 XMLCh* fPrefix;
00384 unsigned int fPrefixBufSz;
00385 XMLCh* fQName;
00386 unsigned int fQNameBufSz;
00387 bool fSpecified;
00388 XMLAttDef::AttTypes fType;
00389 XMLCh* fValue;
00390 unsigned int fValueBufSz;
00391 unsigned int fURIId;
00392 };
00393
00394
00395
00396
00397 inline XMLAttr::~XMLAttr()
00398 {
00399 cleanUp();
00400 }
00401
00402
00403
00404
00405
00406 inline const XMLCh* XMLAttr::getName() const
00407 {
00408 return fName;
00409 }
00410
00411 inline const XMLCh* XMLAttr::getPrefix() const
00412 {
00413 return fPrefix;
00414 }
00415
00416 inline bool XMLAttr::getSpecified() const
00417 {
00418 return fSpecified;
00419 }
00420
00421 inline XMLAttDef::AttTypes XMLAttr::getType() const
00422 {
00423 return fType;
00424 }
00425
00426 inline const XMLCh* XMLAttr::getValue() const
00427 {
00428 return fValue;
00429 }
00430
00431 inline unsigned int XMLAttr::getURIId() const
00432 {
00433 return fURIId;
00434 }
00435
00436
00437
00438
00439
00440 inline void XMLAttr::set(const unsigned int uriId
00441 , const XMLCh* const attrName
00442 , const XMLCh* const attrPrefix
00443 , const XMLCh* const attrValue
00444 , const XMLAttDef::AttTypes type)
00445 {
00446
00447 setName(uriId, attrName, attrPrefix);
00448 setValue(attrValue);
00449
00450
00451 fType = type;
00452 }
00453
00454 inline void XMLAttr::setType(const XMLAttDef::AttTypes newValue)
00455 {
00456 fType = newValue;
00457 }
00458
00459 inline void XMLAttr::setSpecified(const bool newValue)
00460 {
00461 fSpecified = newValue;
00462 }
00463
00464 #endif