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 #if !defined(XMLENTITYDECL_HPP)
00089 #define XMLENTITYDECL_HPP
00090
00091 #include <xercesc/util/XMLString.hpp>
00092
00111 class XMLEntityDecl
00112 {
00113 public:
00114
00115
00116
00117
00120
00124 XMLEntityDecl();
00125
00130 XMLEntityDecl
00131 (
00132 const XMLCh* const entName
00133 );
00134
00141 XMLEntityDecl
00142 (
00143 const XMLCh* const entName
00144 , const XMLCh* const value
00145 );
00146
00153 XMLEntityDecl
00154 (
00155 const XMLCh* const entName
00156 , const XMLCh value
00157 );
00159
00162
00166 virtual ~XMLEntityDecl();
00167
00169
00170
00171
00172
00173
00174
00177
00185 virtual bool getDeclaredInIntSubset() const = 0;
00186
00192 virtual bool getIsParameter() const = 0;
00193
00199 virtual bool getIsSpecialChar() const = 0;
00200
00202
00203
00204
00205
00206
00207
00210
00215 unsigned int getId() const;
00216
00222 const XMLCh* getName() const;
00223
00228 const XMLCh* getNotationName() const;
00229
00234 const XMLCh* getPublicId() const;
00235
00240 const XMLCh* getSystemId() const;
00241
00245 const XMLCh* getBaseURI() const;
00246
00252 const XMLCh* getValue() const;
00253
00259 unsigned int getValueLen() const;
00260
00265 bool isExternal() const;
00266
00272 bool isUnparsed() const;
00273
00275
00276
00277
00278
00279
00280
00283
00292 void setName
00293 (
00294 const XMLCh* const entName
00295 );
00296
00303 void setNotationName(const XMLCh* const newName);
00304
00311 void setPublicId(const XMLCh* const newId);
00312
00322 void setSystemId(const XMLCh* const newId);
00323
00330 void setBaseURI(const XMLCh* const newId);
00331
00339 void setValue(const XMLCh* const newValue);
00340
00342
00343
00344 void setId(const unsigned int newId);
00345
00346
00347
00348
00349
00350
00353
00360 const XMLCh* getKey() const;
00361
00363
00364
00365 private :
00366
00367
00368
00369 XMLEntityDecl(const XMLEntityDecl&);
00370 void operator=(XMLEntityDecl&);
00371
00372
00373
00374
00375
00376 void cleanUp();
00377
00378
00379
00380
00381
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 unsigned int fId;
00408 XMLCh* fName;
00409 XMLCh* fNotationName;
00410 XMLCh* fPublicId;
00411 XMLCh* fSystemId;
00412 XMLCh* fValue;
00413 unsigned int fValueLen;
00414 XMLCh* fBaseURI;
00415 };
00416
00417
00418
00419
00420
00421 inline unsigned int XMLEntityDecl::getId() const
00422 {
00423 return fId;
00424 }
00425
00426 inline const XMLCh* XMLEntityDecl::getName() const
00427 {
00428 return fName;
00429 }
00430
00431 inline const XMLCh* XMLEntityDecl::getNotationName() const
00432 {
00433 return fNotationName;
00434 }
00435
00436 inline const XMLCh* XMLEntityDecl::getPublicId() const
00437 {
00438 return fPublicId;
00439 }
00440
00441 inline const XMLCh* XMLEntityDecl::getSystemId() const
00442 {
00443 return fSystemId;
00444 }
00445
00446 inline const XMLCh* XMLEntityDecl::getBaseURI() const
00447 {
00448 return fBaseURI;
00449 }
00450
00451 inline const XMLCh* XMLEntityDecl::getValue() const
00452 {
00453 return fValue;
00454 }
00455
00456 inline unsigned int XMLEntityDecl::getValueLen() const
00457 {
00458 return fValueLen;
00459 }
00460
00461 inline bool XMLEntityDecl::isExternal() const
00462 {
00463
00464 return ((fPublicId != 0) || (fSystemId != 0));
00465 }
00466
00467 inline bool XMLEntityDecl::isUnparsed() const
00468 {
00469
00470 return (fNotationName != 0);
00471 }
00472
00473
00474
00475
00476
00477 inline void XMLEntityDecl::setId(const unsigned int newId)
00478 {
00479 fId = newId;
00480 }
00481
00482 inline void XMLEntityDecl::setNotationName(const XMLCh* const newName)
00483 {
00484 delete [] fNotationName;
00485 fNotationName = XMLString::replicate(newName);
00486 }
00487
00488 inline void XMLEntityDecl::setPublicId(const XMLCh* const newId)
00489 {
00490 delete [] fPublicId;
00491 fPublicId = XMLString::replicate(newId);
00492 }
00493
00494 inline void XMLEntityDecl::setSystemId(const XMLCh* const newId)
00495 {
00496 delete [] fSystemId;
00497 fSystemId = XMLString::replicate(newId);
00498 }
00499
00500 inline void XMLEntityDecl::setBaseURI(const XMLCh* const newId)
00501 {
00502 delete [] fBaseURI;
00503 fBaseURI = XMLString::replicate(newId);
00504 }
00505
00506 inline void XMLEntityDecl::setValue(const XMLCh* const newValue)
00507 {
00508 delete [] fValue;
00509 fValue = XMLString::replicate(newValue);
00510 fValueLen = XMLString::stringLen(newValue);
00511 }
00512
00513
00514
00515
00516
00517 inline const XMLCh* XMLEntityDecl::getKey() const
00518 {
00519 return fName;
00520 }
00521
00522 #endif