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 #if !defined(XMLATTR_HPP)
00107 #define XMLATTR_HPP
00108
00109 #include <xercesc/util/XMLString.hpp>
00110 #include <xercesc/util/QName.hpp>
00111 #include <xercesc/framework/XMLAttDef.hpp>
00112
00113 XERCES_CPP_NAMESPACE_BEGIN
00114
00136 class XMLAttr
00137 {
00138 public:
00139
00140
00141
00144
00150 XMLAttr();
00151
00178 XMLAttr
00179 (
00180 const unsigned int uriId
00181 , const XMLCh* const attrName
00182 , const XMLCh* const attrPrefix
00183 , const XMLCh* const attrValue
00184 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00185 , const bool specified = true
00186 );
00187
00210 XMLAttr
00211 (
00212 const unsigned int uriId
00213 , const XMLCh* const rawName
00214 , const XMLCh* const attrValue
00215 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00216 , const bool specified = true
00217 );
00218
00220
00223 ~XMLAttr();
00225
00226
00227
00228
00229
00230
00233
00237 QName* getAttName() const;
00238
00243 const XMLCh* getName() const;
00244
00249 const XMLCh* getPrefix() const;
00250
00256 const XMLCh* getQName() const;
00257
00262 bool getSpecified() const;
00263
00268 XMLAttDef::AttTypes getType() const;
00269
00275 const XMLCh* getValue() const;
00276
00281 unsigned int getURIId() const;
00282
00284
00285
00286
00287
00288
00289
00292
00317 void set
00318 (
00319 const unsigned int uriId
00320 , const XMLCh* const attrName
00321 , const XMLCh* const attrPrefix
00322 , const XMLCh* const attrValue
00323 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00324 );
00325
00346 void set
00347 (
00348 const unsigned int uriId
00349 , const XMLCh* const attrRawName
00350 , const XMLCh* const attrValue
00351 , const XMLAttDef::AttTypes type = XMLAttDef::CData
00352 );
00353
00368 void setName
00369 (
00370 const unsigned int uriId
00371 , const XMLCh* const attrName
00372 , const XMLCh* const attrPrefix
00373 );
00374
00382 void setSpecified(const bool newValue);
00383
00392 void setType(const XMLAttDef::AttTypes newType);
00393
00401 void setValue(const XMLCh* const newValue);
00402
00410 void setURIId(const unsigned int uriId);
00411
00413
00414
00415
00416 private :
00417
00418
00419
00420 XMLAttr(const XMLAttr&);
00421 XMLAttr& operator=(const XMLAttr&);
00422
00423
00424
00425
00426
00427 void cleanUp();
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450 bool fSpecified;
00451 XMLAttDef::AttTypes fType;
00452 XMLCh* fValue;
00453 unsigned int fValueBufSz;
00454 QName* fAttName;
00455 };
00456
00457
00458
00459
00460 inline XMLAttr::~XMLAttr()
00461 {
00462 cleanUp();
00463 }
00464
00465
00466
00467
00468
00469 inline QName* XMLAttr::getAttName() const
00470 {
00471 return fAttName;
00472 }
00473
00474 inline const XMLCh* XMLAttr::getName() const
00475 {
00476 return fAttName->getLocalPart();
00477 }
00478
00479 inline const XMLCh* XMLAttr::getPrefix() const
00480 {
00481 return fAttName->getPrefix();
00482 }
00483
00484 inline bool XMLAttr::getSpecified() const
00485 {
00486 return fSpecified;
00487 }
00488
00489 inline XMLAttDef::AttTypes XMLAttr::getType() const
00490 {
00491 return fType;
00492 }
00493
00494 inline const XMLCh* XMLAttr::getValue() const
00495 {
00496 return fValue;
00497 }
00498
00499 inline unsigned int XMLAttr::getURIId() const
00500 {
00501 return fAttName->getURI();
00502 }
00503
00504
00505
00506
00507
00508 inline void XMLAttr::set(const unsigned int uriId
00509 , const XMLCh* const attrName
00510 , const XMLCh* const attrPrefix
00511 , const XMLCh* const attrValue
00512 , const XMLAttDef::AttTypes type)
00513 {
00514
00515 fAttName->setName(attrPrefix, attrName, uriId);
00516 setValue(attrValue);
00517
00518
00519 fType = type;
00520 }
00521
00522 inline void XMLAttr::set(const unsigned int uriId
00523 , const XMLCh* const attrRawName
00524 , const XMLCh* const attrValue
00525 , const XMLAttDef::AttTypes type)
00526 {
00527
00528 fAttName->setName(attrRawName, uriId);
00529 setValue(attrValue);
00530
00531
00532 fType = type;
00533 }
00534
00535 inline void XMLAttr::setType(const XMLAttDef::AttTypes newValue)
00536 {
00537 fType = newValue;
00538 }
00539
00540 inline void XMLAttr::setSpecified(const bool newValue)
00541 {
00542 fSpecified = newValue;
00543 }
00544
00545 XERCES_CPP_NAMESPACE_END
00546
00547 #endif