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 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 #if !defined(XMLNOTATIONDECL_HPP)
00120 #define XMLNOTATIONDECL_HPP
00121 
00122 #include <xercesc/util/XMemory.hpp>
00123 #include <xercesc/util/PlatformUtils.hpp>
00124 #include <xercesc/util/XMLString.hpp>
00125 #include <xercesc/internal/XSerializable.hpp>
00126 
00127 XERCES_CPP_NAMESPACE_BEGIN
00128 
00138 class  XMLNotationDecl : public XSerializable, public XMemory
00139 {
00140 public:
00141     
00142     
00143     
00144 
00147     XMLNotationDecl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
00148     XMLNotationDecl
00149     (
00150         const   XMLCh* const    notName
00151         , const XMLCh* const    pubId
00152         , const XMLCh* const    sysId
00153         , const XMLCh* const    baseURI = 0
00154         , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
00155     );
00157 
00160     ~XMLNotationDecl();
00162 
00163 
00164     
00165     
00166     
00167     unsigned int getId() const;
00168     const XMLCh* getName() const;
00169     const XMLCh* getPublicId() const;
00170     const XMLCh* getSystemId() const;
00171     const XMLCh* getBaseURI() const;
00172     unsigned int getNameSpaceId() const;
00173     MemoryManager* getMemoryManager() const;
00174 
00175 
00176     
00177     
00178     
00179     void setId(const unsigned int newId);
00180     void setName
00181     (
00182         const   XMLCh* const    notName
00183     );
00184     void setPublicId(const XMLCh* const newId);
00185     void setSystemId(const XMLCh* const newId);
00186     void setBaseURI(const XMLCh* const newId);
00187     void setNameSpaceId(const unsigned int newId);
00188 
00189     
00190     
00191     
00192     const XMLCh* getKey() const;
00193 
00194     
00195 
00196 
00197     DECL_XSERIALIZABLE(XMLNotationDecl)
00198 
00199 private :
00200     
00201     
00202     
00203     XMLNotationDecl(const XMLNotationDecl&);
00204     XMLNotationDecl& operator=(const XMLNotationDecl&);
00205 
00206 
00207     
00208     
00209     
00210     void cleanUp();
00211 
00212 
00213     
00214     
00215     
00216     
00217     
00218     
00219     
00220     
00221     
00222     
00223     
00224     
00225     
00226     
00227     
00228     
00229     
00230     
00231     
00232     unsigned int    fId;
00233     XMLCh*          fName;
00234     XMLCh*          fPublicId;
00235     XMLCh*          fSystemId;
00236     XMLCh*          fBaseURI;
00237     unsigned int    fNameSpaceId;
00238     MemoryManager*  fMemoryManager;
00239 };
00240 
00241 
00242 
00243 
00244 
00245 inline unsigned int XMLNotationDecl::getId() const
00246 {
00247     return fId;
00248 }
00249 
00250 inline const XMLCh* XMLNotationDecl::getName() const
00251 {
00252     return fName;
00253 }
00254 
00255 inline unsigned int XMLNotationDecl::getNameSpaceId() const
00256 {
00257     return fNameSpaceId;
00258 }
00259 
00260 inline const XMLCh* XMLNotationDecl::getPublicId() const
00261 {
00262     return fPublicId;
00263 }
00264 
00265 inline const XMLCh* XMLNotationDecl::getSystemId() const
00266 {
00267     return fSystemId;
00268 }
00269 
00270 inline const XMLCh* XMLNotationDecl::getBaseURI() const
00271 {
00272     return fBaseURI;
00273 }
00274 
00275 inline MemoryManager* XMLNotationDecl::getMemoryManager() const
00276 {
00277     return fMemoryManager;
00278 }
00279 
00280 
00281 
00282 
00283 inline void XMLNotationDecl::setId(const unsigned int newId)
00284 {
00285     fId = newId;
00286 }
00287 
00288 inline void XMLNotationDecl::setNameSpaceId(const unsigned int newId)
00289 {
00290     fNameSpaceId = newId;
00291 }
00292 
00293 inline void XMLNotationDecl::setPublicId(const XMLCh* const newId)
00294 {
00295     if (fPublicId)
00296         fMemoryManager->deallocate(fPublicId);
00297 
00298     fPublicId = XMLString::replicate(newId, fMemoryManager);
00299 }
00300 
00301 inline void XMLNotationDecl::setSystemId(const XMLCh* const newId)
00302 {
00303     if (fSystemId)
00304         fMemoryManager->deallocate(fSystemId);
00305 
00306     fSystemId = XMLString::replicate(newId, fMemoryManager);
00307 }
00308 
00309 inline void XMLNotationDecl::setBaseURI(const XMLCh* const newId)
00310 {
00311     if (fBaseURI)
00312         fMemoryManager->deallocate(fBaseURI);
00313 
00314     fBaseURI = XMLString::replicate(newId, fMemoryManager);
00315 }
00316 
00317 
00318 
00319 
00320 
00321 inline const XMLCh* XMLNotationDecl::getKey() const
00322 {
00323     return fName;
00324 }
00325 
00326 XERCES_CPP_NAMESPACE_END
00327 
00328 #endif