00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(XMLNOTATIONDECL_HPP)
00022 #define XMLNOTATIONDECL_HPP
00023
00024 #include <xercesc/util/XMemory.hpp>
00025 #include <xercesc/util/PlatformUtils.hpp>
00026 #include <xercesc/util/XMLString.hpp>
00027 #include <xercesc/internal/XSerializable.hpp>
00028
00029 XERCES_CPP_NAMESPACE_BEGIN
00030
00040 class XMLNotationDecl : public XSerializable, public XMemory
00041 {
00042 public:
00043
00044
00045
00046
00049 XMLNotationDecl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
00050 XMLNotationDecl
00051 (
00052 const XMLCh* const notName
00053 , const XMLCh* const pubId
00054 , const XMLCh* const sysId
00055 , const XMLCh* const baseURI = 0
00056 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00057 );
00059
00062 ~XMLNotationDecl();
00064
00065
00066
00067
00068
00069 unsigned int getId() const;
00070 const XMLCh* getName() const;
00071 const XMLCh* getPublicId() const;
00072 const XMLCh* getSystemId() const;
00073 const XMLCh* getBaseURI() const;
00074 unsigned int getNameSpaceId() const;
00075 MemoryManager* getMemoryManager() const;
00076
00077
00078
00079
00080
00081 void setId(const unsigned int newId);
00082 void setName
00083 (
00084 const XMLCh* const notName
00085 );
00086 void setPublicId(const XMLCh* const newId);
00087 void setSystemId(const XMLCh* const newId);
00088 void setBaseURI(const XMLCh* const newId);
00089 void setNameSpaceId(const unsigned int newId);
00090
00091
00092
00093
00094 const XMLCh* getKey() const;
00095
00096
00097
00098
00099 DECL_XSERIALIZABLE(XMLNotationDecl)
00100
00101 private :
00102
00103
00104
00105 XMLNotationDecl(const XMLNotationDecl&);
00106 XMLNotationDecl& operator=(const XMLNotationDecl&);
00107
00108
00109
00110
00111
00112 void cleanUp();
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 unsigned int fId;
00135 unsigned int fNameSpaceId;
00136 XMLCh* fName;
00137 XMLCh* fPublicId;
00138 XMLCh* fSystemId;
00139 XMLCh* fBaseURI;
00140 MemoryManager* fMemoryManager;
00141 };
00142
00143
00144
00145
00146
00147 inline unsigned int XMLNotationDecl::getId() const
00148 {
00149 return fId;
00150 }
00151
00152 inline const XMLCh* XMLNotationDecl::getName() const
00153 {
00154 return fName;
00155 }
00156
00157 inline unsigned int XMLNotationDecl::getNameSpaceId() const
00158 {
00159 return fNameSpaceId;
00160 }
00161
00162 inline const XMLCh* XMLNotationDecl::getPublicId() const
00163 {
00164 return fPublicId;
00165 }
00166
00167 inline const XMLCh* XMLNotationDecl::getSystemId() const
00168 {
00169 return fSystemId;
00170 }
00171
00172 inline const XMLCh* XMLNotationDecl::getBaseURI() const
00173 {
00174 return fBaseURI;
00175 }
00176
00177 inline MemoryManager* XMLNotationDecl::getMemoryManager() const
00178 {
00179 return fMemoryManager;
00180 }
00181
00182
00183
00184
00185 inline void XMLNotationDecl::setId(const unsigned int newId)
00186 {
00187 fId = newId;
00188 }
00189
00190 inline void XMLNotationDecl::setNameSpaceId(const unsigned int newId)
00191 {
00192 fNameSpaceId = newId;
00193 }
00194
00195 inline void XMLNotationDecl::setPublicId(const XMLCh* const newId)
00196 {
00197 if (fPublicId)
00198 fMemoryManager->deallocate(fPublicId);
00199
00200 fPublicId = XMLString::replicate(newId, fMemoryManager);
00201 }
00202
00203 inline void XMLNotationDecl::setSystemId(const XMLCh* const newId)
00204 {
00205 if (fSystemId)
00206 fMemoryManager->deallocate(fSystemId);
00207
00208 fSystemId = XMLString::replicate(newId, fMemoryManager);
00209 }
00210
00211 inline void XMLNotationDecl::setBaseURI(const XMLCh* const newId)
00212 {
00213 if (fBaseURI)
00214 fMemoryManager->deallocate(fBaseURI);
00215
00216 fBaseURI = XMLString::replicate(newId, fMemoryManager);
00217 }
00218
00219
00220
00221
00222
00223 inline const XMLCh* XMLNotationDecl::getKey() const
00224 {
00225 return fName;
00226 }
00227
00228 XERCES_CPP_NAMESPACE_END
00229
00230 #endif