<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Xerces-C++: XMLAttDef.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR> <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../charter.html" onMouseOut="rolloverOff('side-charter');" onMouseOver="rolloverOn('side-charter');"><IMG alt="Charter" border="0" height="12" hspace="0" name="side-charter" onLoad="rolloverLoad('side-charter','../graphics/charter-label-2.jpg','../graphics/charter-label-3.jpg');" src="../graphics/charter-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR> <A href="http://xml.apache.org/xerces-c/download.cgi" onMouseOut="rolloverOff('side-ext-20');" onMouseOver="rolloverOn('side-ext-20');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-20" onLoad="rolloverLoad('side-ext-20','../graphics/ext-20-label-2.jpg','../graphics/ext-20-label-3.jpg');" src="../graphics/ext-20-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build Instructions" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-70');" onMouseOver="rolloverOn('side-ext-70');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-70" onLoad="rolloverLoad('side-ext-70','../graphics/ext-70-label-2.jpg','../graphics/ext-70-label-3.jpg');" src="../graphics/ext-70-label-3.jpg" vspace="0" width="120"></A><BR> <IMG alt="Programming" border="0" height="12" hspace="0" src="../graphics/program-label-1.jpg" vspace="0" width="120"><BR> <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR> <A href="bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="http://svn.apache.org/viewcvs.cgi/xerces/?root=Apache-SVN" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Source Repository" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR> <A href="http://marc.theaimsgroup.com/?l=xerces-c-users" onMouseOut="rolloverOff('side-ext-104');" onMouseOver="rolloverOn('side-ext-104');"><IMG alt="User Mail Archive" border="0" height="12" hspace="0" name="side-ext-104" onLoad="rolloverLoad('side-ext-104','../graphics/ext-104-label-2.jpg','../graphics/ext-104-label-3.jpg');" src="../graphics/ext-104-label-3.jpg" vspace="0" width="120"></A><BR> <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-106');" onMouseOver="rolloverOn('side-ext-106');"><IMG alt="Devel Mail Archive" border="0" height="12" hspace="0" name="side-ext-106" onLoad="rolloverLoad('side-ext-106','../graphics/ext-106-label-2.jpg','../graphics/ext-106-label-3.jpg');" src="../graphics/ext-106-label-3.jpg" vspace="0" width="120"></A><BR> <IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD> <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif"> <P> <!-- Generated by Doxygen 1.4.1 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <div class="nav"> <a class="el" href="dir_000000.html">src</a> / <a class="el" href="dir_000001.html">xercesc</a> / <a class="el" href="dir_000006.html">framework</a></div> <h1>XMLAttDef.hpp</h1><a href="XMLAttDef_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span> 00002 <span class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</span> 00003 <span class="comment"> * </span> 00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> 00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> 00006 <span class="comment"> * You may obtain a copy of the License at</span> 00007 <span class="comment"> * </span> 00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> 00009 <span class="comment"> * </span> 00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> 00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> 00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> 00013 <span class="comment"> * See the License for the specific language governing permissions and</span> 00014 <span class="comment"> * limitations under the License.</span> 00015 <span class="comment"> */</span> 00016 00017 <span class="comment">/*</span> 00018 <span class="comment"> * $Id: XMLAttDef.hpp 191054 2005-06-17 02:56:35Z jberry $</span> 00019 <span class="comment"> */</span> 00020 00021 <span class="preprocessor">#if !defined(ATTDEF_HPP)</span> <a name="l00022"></a><a class="code" href="XMLAttDef_8hpp.html#a0">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define ATTDEF_HPP</span> 00023 <span class="preprocessor"></span> 00024 <span class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></span> 00025 <span class="preprocessor">#include <<a class="code" href="XMLString_8hpp.html">xercesc/util/XMLString.hpp</a>></span> 00026 <span class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></span> 00027 <span class="preprocessor">#include <xercesc/internal/XSerializable.hpp></span> 00028 00029 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_BEGIN</a> 00030 00031 <span class="keyword">class </span><a class="code" href="classXMLAttr.html">XMLAttr</a>; 00032 <a name="l00051"></a><a class="code" href="classXMLAttDef.html">00051</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a10"></a> XMLAttDef : <span class="keyword">public</span> XSerializable, <span class="keyword">public</span> <a class="code" href="classXMemory.html">XMemory</a> 00052 { 00053 <span class="keyword">public</span>: 00054 <span class="comment">// -----------------------------------------------------------------------</span> 00055 <span class="comment">// Class specific types</span> 00056 <span class="comment">//</span> 00057 <span class="comment">// AttTypes</span> 00058 <span class="comment">// The list of possible types that an attribute can have, according</span> 00059 <span class="comment">// to the XML 1.0 spec and schema.</span> 00060 <span class="comment">//</span> 00061 <span class="comment">// DefAttTypes</span> 00062 <span class="comment">// The modifiers that an attribute decl can have, which indicates</span> 00063 <span class="comment">// whether instances of that attributes are required, implied, etc..</span> 00064 <span class="comment">//</span> 00065 <span class="comment">// CreateReasons</span> 00066 <span class="comment">// This type is used to store how an attribute declaration got into</span> 00067 <span class="comment">// the elementdecl's attribute pool.</span> 00068 <span class="comment">//</span> 00069 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00070"></a><a class="code" href="classXMLAttDef.html#w33">00070</a> <span class="keyword">enum</span> AttTypes 00071 { 00072 CData = 0 00073 , ID = 1 00074 , IDRef = 2 00075 , IDRefs = 3 00076 , Entity = 4 00077 , Entities = 5 00078 , NmToken = 6 00079 , NmTokens = 7 00080 , Notation = 8 00081 , Enumeration = 9 00082 , Simple = 10 00083 , Any_Any = 11 00084 , Any_Other = 12 00085 , Any_List = 13 00086 00087 , AttTypes_Count 00088 , AttTypes_Min = 0 00089 , AttTypes_Max = 13 00090 , AttTypes_Unknown = -1 00091 }; 00092 <a name="l00093"></a><a class="code" href="classXMLAttDef.html#w34">00093</a> <span class="keyword">enum</span> DefAttTypes 00094 { 00095 Default = 0 00096 , Fixed = 1 00097 , Required = 2 00098 , Required_And_Fixed = 3 00099 , Implied = 4 00100 , ProcessContents_Skip = 5 00101 , ProcessContents_Lax = 6 00102 , ProcessContents_Strict = 7 00103 , Prohibited = 8 00104 00105 , DefAttTypes_Count 00106 , DefAttTypes_Min = 0 00107 , DefAttTypes_Max = 8 00108 , DefAttTypes_Unknown = -1 00109 }; 00110 <a name="l00111"></a><a class="code" href="classXMLAttDef.html#w35">00111</a> <span class="keyword">enum</span> CreateReasons 00112 { 00113 NoReason 00114 , JustFaultIn 00115 }; 00116 00117 <span class="comment">// -----------------------------------------------------------------------</span> 00118 <span class="comment">// Public static data members</span> 00119 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00120"></a><a class="code" href="classXMLAttDef.html#s0">00120</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fgInvalidAttrId; 00121 00122 00123 <span class="comment">// -----------------------------------------------------------------------</span> 00124 <span class="comment">// Public, static methods</span> 00125 <span class="comment">// -----------------------------------------------------------------------</span> 00126 00129 00140 <span class="keyword">static</span> <span class="keyword">const</span> XMLCh* getAttTypeString(<span class="keyword">const</span> AttTypes attrType 00141 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager); 00142 00153 <span class="keyword">static</span> <span class="keyword">const</span> XMLCh* getDefAttTypeString(<span class="keyword">const</span> DefAttTypes attrType 00154 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager); 00155 00157 00158 00159 <span class="comment">// -----------------------------------------------------------------------</span> 00160 <span class="comment">// Destructor</span> 00161 <span class="comment">// -----------------------------------------------------------------------</span> 00162 00165 00169 <span class="keyword">virtual</span> ~XMLAttDef(); 00171 00172 00173 <span class="comment">// -----------------------------------------------------------------------</span> 00174 <span class="comment">// The virtual attribute def interface</span> 00175 <span class="comment">// -----------------------------------------------------------------------</span> 00176 00179 00188 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getFullName() <span class="keyword">const </span>= 0; 00189 00194 <span class="keyword">virtual</span> <span class="keywordtype">void</span> reset() = 0; 00195 00197 00198 00199 <span class="comment">// -----------------------------------------------------------------------</span> 00200 <span class="comment">// Getter methods</span> 00201 <span class="comment">// -----------------------------------------------------------------------</span> 00202 00205 00214 DefAttTypes getDefaultType() <span class="keyword">const</span>; 00215 00225 <span class="keyword">const</span> XMLCh* getEnumeration() <span class="keyword">const</span>; 00226 00235 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getId() <span class="keyword">const</span>; 00236 00251 <span class="keywordtype">bool</span> getProvided() <span class="keyword">const</span>; 00252 00262 AttTypes getType() <span class="keyword">const</span>; 00263 00273 <span class="keyword">const</span> XMLCh* getValue() <span class="keyword">const</span>; 00274 00283 CreateReasons getCreateReason() <span class="keyword">const</span>; 00284 00292 <span class="keywordtype">bool</span> isExternal() <span class="keyword">const</span>; 00293 00301 <a class="code" href="classMemoryManager.html">MemoryManager</a>* getMemoryManager() <span class="keyword">const</span>; 00302 00303 00308 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDOMTypeInfoUri() <span class="keyword">const </span>= 0; 00309 00314 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDOMTypeInfoName() <span class="keyword">const </span>= 0; 00315 00317 00318 00319 <span class="comment">// -----------------------------------------------------------------------</span> 00320 <span class="comment">// Setter methods</span> 00321 <span class="comment">// -----------------------------------------------------------------------</span> 00322 00325 00334 <span class="keywordtype">void</span> setDefaultType(<span class="keyword">const</span> XMLAttDef::DefAttTypes newValue); 00335 00344 <span class="keywordtype">void</span> setId(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> newId); 00345 00355 <span class="keywordtype">void</span> setProvided(<span class="keyword">const</span> <span class="keywordtype">bool</span> newValue); 00356 00364 <span class="keywordtype">void</span> setType(<span class="keyword">const</span> XMLAttDef::AttTypes newValue); 00365 00376 <span class="keywordtype">void</span> setValue(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> newValue); 00377 00388 <span class="keywordtype">void</span> setEnumeration(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> newValue); 00389 00397 <span class="keywordtype">void</span> setCreateReason(<span class="keyword">const</span> CreateReasons newReason); 00398 00404 <span class="keywordtype">void</span> setExternalAttDeclaration(<span class="keyword">const</span> <span class="keywordtype">bool</span> aValue); 00405 00407 00408 <span class="comment">/***</span> 00409 <span class="comment"> * Support for Serialization/De-serialization</span> 00410 <span class="comment"> ***/</span> 00411 DECL_XSERIALIZABLE(XMLAttDef) 00412 00413 protected : 00414 <span class="comment">// -----------------------------------------------------------------------</span> 00415 <span class="comment">// Hidden constructors</span> 00416 <span class="comment">// -----------------------------------------------------------------------</span> 00417 XMLAttDef 00418 ( 00419 const AttTypes type = CData 00420 , const DefAttTypes defType= Implied 00421 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* const manager = <a class="code" href="classXMLPlatformUtils.html">XMLPlatformUtils</a>::fgMemoryManager 00422 ); 00423 XMLAttDef 00424 ( 00425 const XMLCh* const attValue 00426 , const AttTypes type 00427 , const DefAttTypes defType 00428 , const XMLCh* const enumValues = 0 00429 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* const manager = <a class="code" href="classXMLPlatformUtils.html">XMLPlatformUtils</a>::fgMemoryManager 00430 ); 00431 00432 00433 private : 00434 <span class="comment">// -----------------------------------------------------------------------</span> 00435 <span class="comment">// Unimplemented constructors and operators</span> 00436 <span class="comment">// -----------------------------------------------------------------------</span> 00437 XMLAttDef(const XMLAttDef&); 00438 XMLAttDef& operator=(const XMLAttDef&); 00439 00440 00441 <span class="comment">// -----------------------------------------------------------------------</span> 00442 <span class="comment">// Private helper methods</span> 00443 <span class="comment">// -----------------------------------------------------------------------</span> 00444 <span class="keywordtype">void</span> cleanUp(); 00445 00446 00447 <span class="comment">// -----------------------------------------------------------------------</span> 00448 <span class="comment">// Private data members</span> 00449 <span class="comment">//</span> 00450 <span class="comment">// fDefaultType</span> 00451 <span class="comment">// Indicates what, if any, default stuff this attribute has.</span> 00452 <span class="comment">//</span> 00453 <span class="comment">// fEnumeration</span> 00454 <span class="comment">// If its an enumeration, this is the list of values as space</span> 00455 <span class="comment">// separated values.</span> 00456 <span class="comment">//</span> 00457 <span class="comment">// fId</span> 00458 <span class="comment">// This is the unique id of this attribute, given to it when its put</span> 00459 <span class="comment">// into the validator's attribute decl pool. It defaults to the</span> 00460 <span class="comment">// special value XMLAttrDef::fgInvalidAttrId.</span> 00461 <span class="comment">//</span> 00462 <span class="comment">// fProvided</span> 00463 <span class="comment">// This field is really for use by the scanner. It is used to track</span> 00464 <span class="comment">// which of the attributes of an element were provided. Any marked</span> 00465 <span class="comment">// as not provided (after scanning the start tag) and having a</span> 00466 <span class="comment">// default type of Required, is in error.</span> 00467 <span class="comment">//</span> 00468 <span class="comment">// fType</span> 00469 <span class="comment">// The type of attribute, which is one of the AttTypes values.</span> 00470 <span class="comment">//</span> 00471 <span class="comment">// fValue</span> 00472 <span class="comment">// This is the value of the attribute, which is the default value</span> 00473 <span class="comment">// given in the attribute declaration.</span> 00474 <span class="comment">//</span> 00475 <span class="comment">// fCreateReason</span> 00476 <span class="comment">// This flag tells us how this attribute got created. Sometimes even</span> 00477 <span class="comment">// the attribute was not declared for the element, we want to fault</span> 00478 <span class="comment">// fault it into the pool to avoid lots of redundant errors.</span> 00479 <span class="comment">//</span> 00480 <span class="comment">// fExternalAttribute</span> 00481 <span class="comment">// This flag indicates whether or not the attribute was declared externally.</span> 00482 <span class="comment">// -----------------------------------------------------------------------</span> 00483 DefAttTypes fDefaultType; 00484 AttTypes fType; 00485 CreateReasons fCreateReason; 00486 <span class="keywordtype">bool</span> fProvided; 00487 <span class="keywordtype">bool</span> fExternalAttribute; 00488 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fId; 00489 XMLCh* fValue; 00490 XMLCh* fEnumeration; 00491 <a class="code" href="classMemoryManager.html">MemoryManager</a>* fMemoryManager; 00492 }; 00493 00494 00495 <span class="comment">// ---------------------------------------------------------------------------</span> 00496 <span class="comment">// Getter methods</span> 00497 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00498"></a><a class="code" href="classXMLAttDef.html#z490_0">00498</a> inline XMLAttDef::DefAttTypes XMLAttDef::getDefaultType()<span class="keyword"> const</span> 00499 <span class="keyword"></span>{ 00500 <span class="keywordflow">return</span> fDefaultType; 00501 } 00502 <a name="l00503"></a><a class="code" href="classXMLAttDef.html#z490_1">00503</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLAttDef.html#z490_1">XMLAttDef::getEnumeration</a>()<span class="keyword"> const</span> 00504 <span class="keyword"></span>{ 00505 <span class="keywordflow">return</span> fEnumeration; 00506 } 00507 <a name="l00508"></a><a class="code" href="classXMLAttDef.html#z490_2">00508</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classXMLAttDef.html#z490_2">XMLAttDef::getId</a>()<span class="keyword"> const</span> 00509 <span class="keyword"></span>{ 00510 <span class="keywordflow">return</span> fId; 00511 } 00512 <a name="l00513"></a><a class="code" href="classXMLAttDef.html#z490_3">00513</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLAttDef.html#z490_3">XMLAttDef::getProvided</a>()<span class="keyword"> const</span> 00514 <span class="keyword"></span>{ 00515 <span class="keywordflow">return</span> fProvided; 00516 } 00517 <a name="l00518"></a><a class="code" href="classXMLAttDef.html#z490_4">00518</a> <span class="keyword">inline</span> <a class="code" href="classXMLAttDef.html#w33">XMLAttDef::AttTypes</a> <a class="code" href="classXMLAttDef.html#z490_4">XMLAttDef::getType</a>()<span class="keyword"> const</span> 00519 <span class="keyword"></span>{ 00520 <span class="keywordflow">return</span> fType; 00521 } 00522 <a name="l00523"></a><a class="code" href="classXMLAttDef.html#z490_5">00523</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLAttDef.html#z490_5">XMLAttDef::getValue</a>()<span class="keyword"> const</span> 00524 <span class="keyword"></span>{ 00525 <span class="keywordflow">return</span> fValue; 00526 } 00527 <a name="l00528"></a><a class="code" href="classXMLAttDef.html#z490_6">00528</a> <span class="keyword">inline</span> <a class="code" href="classXMLAttDef.html#w35">XMLAttDef::CreateReasons</a> <a class="code" href="classXMLAttDef.html#z490_6">XMLAttDef::getCreateReason</a>()<span class="keyword"> const</span> 00529 <span class="keyword"></span>{ 00530 <span class="keywordflow">return</span> fCreateReason; 00531 } 00532 <a name="l00533"></a><a class="code" href="classXMLAttDef.html#z490_7">00533</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLAttDef.html#z490_7">XMLAttDef::isExternal</a>()<span class="keyword"> const</span> 00534 <span class="keyword"></span>{ 00535 <span class="keywordflow">return</span> fExternalAttribute; 00536 } 00537 <a name="l00538"></a><a class="code" href="classXMLAttDef.html#z490_8">00538</a> <span class="keyword">inline</span> <a class="code" href="classMemoryManager.html">MemoryManager</a>* <a class="code" href="classXMLAttDef.html#z490_8">XMLAttDef::getMemoryManager</a>()<span class="keyword"> const</span> 00539 <span class="keyword"></span>{ 00540 <span class="keywordflow">return</span> fMemoryManager; 00541 } 00542 00543 <span class="comment">// ---------------------------------------------------------------------------</span> 00544 <span class="comment">// XMLAttDef: Setter methods</span> 00545 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00546"></a><a class="code" href="classXMLAttDef.html#z492_0">00546</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_0">XMLAttDef::setDefaultType</a>(<span class="keyword">const</span> XMLAttDef::DefAttTypes newValue) 00547 { 00548 fDefaultType = newValue; 00549 } 00550 <a name="l00551"></a><a class="code" href="classXMLAttDef.html#z492_5">00551</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_5">XMLAttDef::setEnumeration</a>(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> newValue) 00552 { 00553 <span class="keywordflow">if</span> (fEnumeration) 00554 fMemoryManager-><a class="code" href="classMemoryManager.html#z442_1">deallocate</a>(fEnumeration); 00555 00556 fEnumeration = <a class="code" href="classXMLString.html#z1011_0">XMLString::replicate</a>(newValue, fMemoryManager); 00557 } 00558 <a name="l00559"></a><a class="code" href="classXMLAttDef.html#z492_1">00559</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_1">XMLAttDef::setId</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> newId) 00560 { 00561 fId = newId; 00562 } 00563 <a name="l00564"></a><a class="code" href="classXMLAttDef.html#z492_2">00564</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_2">XMLAttDef::setProvided</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> newValue) 00565 { 00566 fProvided = newValue; 00567 } 00568 <a name="l00569"></a><a class="code" href="classXMLAttDef.html#z492_3">00569</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_3">XMLAttDef::setType</a>(<span class="keyword">const</span> XMLAttDef::AttTypes newValue) 00570 { 00571 fType = newValue; 00572 } 00573 <a name="l00574"></a><a class="code" href="classXMLAttDef.html#z492_4">00574</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_4">XMLAttDef::setValue</a>(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> newValue) 00575 { 00576 <span class="keywordflow">if</span> (fValue) 00577 fMemoryManager-><a class="code" href="classMemoryManager.html#z442_1">deallocate</a>(fValue); 00578 00579 fValue = <a class="code" href="classXMLString.html#z1011_0">XMLString::replicate</a>(newValue, fMemoryManager); 00580 } 00581 00582 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00583"></a><a class="code" href="classXMLAttDef.html#z492_6">00583</a> <a class="code" href="classXMLAttDef.html#z492_6">XMLAttDef::setCreateReason</a>(<span class="keyword">const</span> XMLAttDef::CreateReasons newReason) 00584 { 00585 fCreateReason = newReason; 00586 } 00587 <a name="l00588"></a><a class="code" href="classXMLAttDef.html#z492_7">00588</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLAttDef.html#z492_7">XMLAttDef::setExternalAttDeclaration</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> aValue) 00589 { 00590 fExternalAttribute = aValue; 00591 } 00592 00593 <a class="code" href="XercesDefs_8hpp.html#a4">XERCES_CPP_NAMESPACE_END</a> 00594 00595 <span class="preprocessor">#endif</span> </pre></div> </FONT></TD></TR></TABLE><BR> </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I> Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved. </I></FONT></TD></TR></TABLE></BODY></HTML>