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(XMLENTITYDECL_HPP)
00086 #define XMLENTITYDECL_HPP
00087
00088 #include <xercesc/util/XMLString.hpp>
00089
00108 class XMLEntityDecl
00109 {
00110 public:
00111
00112
00113
00114
00117
00121 XMLEntityDecl();
00122
00127 XMLEntityDecl
00128 (
00129 const XMLCh* const entName
00130 );
00131
00138 XMLEntityDecl
00139 (
00140 const XMLCh* const entName
00141 , const XMLCh* const value
00142 );
00143
00150 XMLEntityDecl
00151 (
00152 const XMLCh* const entName
00153 , const XMLCh value
00154 );
00156
00159
00163 virtual ~XMLEntityDecl();
00164
00166
00167
00168
00169
00170
00171
00174
00182 virtual bool getDeclaredInIntSubset() const = 0;
00183
00189 virtual bool getIsParameter() const = 0;
00190
00196 virtual bool getIsSpecialChar() const = 0;
00197
00199
00200
00201
00202
00203
00204
00207
00212 unsigned int getId() const;
00213
00219 const XMLCh* getName() const;
00220
00225 const XMLCh* getNotationName() const;
00226
00231 const XMLCh* getPublicId() const;
00232
00237 const XMLCh* getSystemId() const;
00238
00244 const XMLCh* getValue() const;
00245
00251 unsigned int getValueLen() const;
00252
00257 bool isExternal() const;
00258
00264 bool isUnparsed() const;
00265
00267
00268
00269
00270
00271
00272
00275
00284 void setName
00285 (
00286 const XMLCh* const entName
00287 );
00288
00295 void setNotationName(const XMLCh* const newName);
00296
00303 void setPublicId(const XMLCh* const newId);
00304
00314 void setSystemId(const XMLCh* const newId);
00315
00323 void setValue(const XMLCh* const newValue);
00324
00326
00327
00328 void setId(const unsigned int newId);
00329
00330
00331
00332
00333
00334
00337
00344 const XMLCh* getKey() const;
00345
00347
00348
00349 private :
00350
00351
00352
00353 XMLEntityDecl(const XMLEntityDecl&);
00354 void operator=(XMLEntityDecl&);
00355
00356
00357
00358
00359
00360 void cleanUp();
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387 unsigned int fId;
00388 XMLCh* fName;
00389 XMLCh* fNotationName;
00390 XMLCh* fPublicId;
00391 XMLCh* fSystemId;
00392 XMLCh* fValue;
00393 unsigned int fValueLen;
00394 };
00395
00396
00397
00398
00399
00400 inline unsigned int XMLEntityDecl::getId() const
00401 {
00402 return fId;
00403 }
00404
00405 inline const XMLCh* XMLEntityDecl::getName() const
00406 {
00407 return fName;
00408 }
00409
00410 inline const XMLCh* XMLEntityDecl::getNotationName() const
00411 {
00412 return fNotationName;
00413 }
00414
00415 inline const XMLCh* XMLEntityDecl::getPublicId() const
00416 {
00417 return fPublicId;
00418 }
00419
00420 inline const XMLCh* XMLEntityDecl::getSystemId() const
00421 {
00422 return fSystemId;
00423 }
00424
00425 inline const XMLCh* XMLEntityDecl::getValue() const
00426 {
00427 return fValue;
00428 }
00429
00430 inline unsigned int XMLEntityDecl::getValueLen() const
00431 {
00432 return fValueLen;
00433 }
00434
00435 inline bool XMLEntityDecl::isExternal() const
00436 {
00437
00438 return ((fPublicId != 0) || (fSystemId != 0));
00439 }
00440
00441 inline bool XMLEntityDecl::isUnparsed() const
00442 {
00443
00444 return (fNotationName != 0);
00445 }
00446
00447
00448
00449
00450
00451 inline void XMLEntityDecl::setId(const unsigned int newId)
00452 {
00453 fId = newId;
00454 }
00455
00456 inline void XMLEntityDecl::setNotationName(const XMLCh* const newName)
00457 {
00458 delete [] fNotationName;
00459 fNotationName = XMLString::replicate(newName);
00460 }
00461
00462 inline void XMLEntityDecl::setPublicId(const XMLCh* const newId)
00463 {
00464 delete [] fPublicId;
00465 fPublicId = XMLString::replicate(newId);
00466 }
00467
00468 inline void XMLEntityDecl::setSystemId(const XMLCh* const newId)
00469 {
00470 delete [] fSystemId;
00471 fSystemId = XMLString::replicate(newId);
00472 }
00473
00474 inline void XMLEntityDecl::setValue(const XMLCh* const newValue)
00475 {
00476 delete [] fValue;
00477 fValue = XMLString::replicate(newValue);
00478 fValueLen = XMLString::stringLen(newValue);
00479 }
00480
00481
00482
00483
00484
00485 inline const XMLCh* XMLEntityDecl::getKey() const
00486 {
00487 return fName;
00488 }
00489
00490 #endif