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 #if !defined(XMLENTITYDECL_HPP)
00092 #define XMLENTITYDECL_HPP
00093
00094 #include <xercesc/util/XMLString.hpp>
00095
00096 XERCES_CPP_NAMESPACE_BEGIN
00097
00116 class XMLEntityDecl
00117 {
00118 public:
00119
00120
00121
00122
00125
00129 XMLEntityDecl();
00130
00135 XMLEntityDecl
00136 (
00137 const XMLCh* const entName
00138 );
00139
00146 XMLEntityDecl
00147 (
00148 const XMLCh* const entName
00149 , const XMLCh* const value
00150 );
00151
00158 XMLEntityDecl
00159 (
00160 const XMLCh* const entName
00161 , const XMLCh value
00162 );
00164
00167
00171 virtual ~XMLEntityDecl();
00172
00174
00175
00176
00177
00178
00179
00182
00190 virtual bool getDeclaredInIntSubset() const = 0;
00191
00197 virtual bool getIsParameter() const = 0;
00198
00204 virtual bool getIsSpecialChar() const = 0;
00205
00207
00208
00209
00210
00211
00212
00215
00220 unsigned int getId() const;
00221
00227 const XMLCh* getName() const;
00228
00233 const XMLCh* getNotationName() const;
00234
00239 const XMLCh* getPublicId() const;
00240
00245 const XMLCh* getSystemId() const;
00246
00250 const XMLCh* getBaseURI() const;
00251
00257 const XMLCh* getValue() const;
00258
00264 unsigned int getValueLen() const;
00265
00270 bool isExternal() const;
00271
00277 bool isUnparsed() const;
00278
00280
00281
00282
00283
00284
00285
00288
00297 void setName
00298 (
00299 const XMLCh* const entName
00300 );
00301
00308 void setNotationName(const XMLCh* const newName);
00309
00316 void setPublicId(const XMLCh* const newId);
00317
00327 void setSystemId(const XMLCh* const newId);
00328
00335 void setBaseURI(const XMLCh* const newId);
00336
00344 void setValue(const XMLCh* const newValue);
00345
00347
00348
00349 void setId(const unsigned int newId);
00350
00351
00352
00353
00354
00355
00358
00365 const XMLCh* getKey() const;
00366
00368
00369
00370 private :
00371
00372
00373
00374 XMLEntityDecl(const XMLEntityDecl&);
00375 void operator=(XMLEntityDecl&);
00376
00377
00378
00379
00380
00381 void cleanUp();
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412 unsigned int fId;
00413 XMLCh* fName;
00414 XMLCh* fNotationName;
00415 XMLCh* fPublicId;
00416 XMLCh* fSystemId;
00417 XMLCh* fValue;
00418 unsigned int fValueLen;
00419 XMLCh* fBaseURI;
00420 };
00421
00422
00423
00424
00425
00426 inline unsigned int XMLEntityDecl::getId() const
00427 {
00428 return fId;
00429 }
00430
00431 inline const XMLCh* XMLEntityDecl::getName() const
00432 {
00433 return fName;
00434 }
00435
00436 inline const XMLCh* XMLEntityDecl::getNotationName() const
00437 {
00438 return fNotationName;
00439 }
00440
00441 inline const XMLCh* XMLEntityDecl::getPublicId() const
00442 {
00443 return fPublicId;
00444 }
00445
00446 inline const XMLCh* XMLEntityDecl::getSystemId() const
00447 {
00448 return fSystemId;
00449 }
00450
00451 inline const XMLCh* XMLEntityDecl::getBaseURI() const
00452 {
00453 return fBaseURI;
00454 }
00455
00456 inline const XMLCh* XMLEntityDecl::getValue() const
00457 {
00458 return fValue;
00459 }
00460
00461 inline unsigned int XMLEntityDecl::getValueLen() const
00462 {
00463 return fValueLen;
00464 }
00465
00466 inline bool XMLEntityDecl::isExternal() const
00467 {
00468
00469 return ((fPublicId != 0) || (fSystemId != 0));
00470 }
00471
00472 inline bool XMLEntityDecl::isUnparsed() const
00473 {
00474
00475 return (fNotationName != 0);
00476 }
00477
00478
00479
00480
00481
00482 inline void XMLEntityDecl::setId(const unsigned int newId)
00483 {
00484 fId = newId;
00485 }
00486
00487 inline void XMLEntityDecl::setNotationName(const XMLCh* const newName)
00488 {
00489 delete [] fNotationName;
00490 fNotationName = XMLString::replicate(newName);
00491 }
00492
00493 inline void XMLEntityDecl::setPublicId(const XMLCh* const newId)
00494 {
00495 delete [] fPublicId;
00496 fPublicId = XMLString::replicate(newId);
00497 }
00498
00499 inline void XMLEntityDecl::setSystemId(const XMLCh* const newId)
00500 {
00501 delete [] fSystemId;
00502 fSystemId = XMLString::replicate(newId);
00503 }
00504
00505 inline void XMLEntityDecl::setBaseURI(const XMLCh* const newId)
00506 {
00507 delete [] fBaseURI;
00508 fBaseURI = XMLString::replicate(newId);
00509 }
00510
00511 inline void XMLEntityDecl::setValue(const XMLCh* const newValue)
00512 {
00513 delete [] fValue;
00514 fValue = XMLString::replicate(newValue);
00515 fValueLen = XMLString::stringLen(newValue);
00516 }
00517
00518
00519
00520
00521
00522 inline const XMLCh* XMLEntityDecl::getKey() const
00523 {
00524 return fName;
00525 }
00526
00527 XERCES_CPP_NAMESPACE_END
00528
00529 #endif