<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Xerces-C++: XMLElementDecl.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>XMLElementDecl.hpp</h1><a href="XMLElementDecl_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-2001,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: XMLElementDecl.hpp 191054 2005-06-17 02:56:35Z jberry $</span> 00019 <span class="comment"> */</span> 00020 00021 <span class="preprocessor">#if !defined(XMLELEMENTDECL_HPP)</span> <a name="l00022"></a><a class="code" href="XMLElementDecl_8hpp.html#a0">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define XMLELEMENTDECL_HPP</span> 00023 <span class="preprocessor"></span> 00024 <span class="preprocessor">#include <<a class="code" href="XMLAttr_8hpp.html">xercesc/framework/XMLAttr.hpp</a>></span> 00025 <span class="preprocessor">#include <<a class="code" href="XMLAttDefList_8hpp.html">xercesc/framework/XMLAttDefList.hpp</a>></span> 00026 <span class="preprocessor">#include <<a class="code" href="XMLString_8hpp.html">xercesc/util/XMLString.hpp</a>></span> 00027 <span class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></span> 00028 <span class="preprocessor">#include <xercesc/internal/XSerializable.hpp></span> 00029 00030 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_BEGIN</a> 00031 00032 <span class="keyword">class </span>ContentSpecNode; 00033 <span class="keyword">class </span><a class="code" href="classXMLContentModel.html">XMLContentModel</a>; 00034 <a name="l00050"></a><a class="code" href="classXMLElementDecl.html">00050</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a10"></a> XMLElementDecl : <span class="keyword">public</span> XSerializable, <span class="keyword">public</span> <a class="code" href="classXMemory.html">XMemory</a> 00051 { 00052 <span class="keyword">public</span>: 00053 <span class="comment">// -----------------------------------------------------------------------</span> 00054 <span class="comment">// Class specific types</span> 00055 <span class="comment">//</span> 00056 <span class="comment">// CreateReasons</span> 00057 <span class="comment">// This type is used to store how an element declaration got into</span> 00058 <span class="comment">// the grammar's element pool. They are faulted in for various</span> 00059 <span class="comment">// reasons.</span> 00060 <span class="comment">//</span> 00061 <span class="comment">// LookupOpts</span> 00062 <span class="comment">// These are the values used by the attribute lookup methods.</span> 00063 <span class="comment">//</span> 00064 <span class="comment">// CharDataOpts</span> 00065 <span class="comment">// This is used to indicate how this type of element reacts to</span> 00066 <span class="comment">// character data as content.</span> 00067 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00068"></a><a class="code" href="classXMLElementDecl.html#w14">00068</a> <span class="keyword">enum</span> CreateReasons 00069 { 00070 NoReason 00071 , Declared 00072 , AttList 00073 , InContentModel 00074 , AsRootElem 00075 , JustFaultIn 00076 }; 00077 <a name="l00082"></a><a class="code" href="classXMLElementDecl.html#w15">00082</a> <span class="keyword">enum</span> LookupOpts 00083 { 00084 AddIfNotFound 00085 , FailIfNotFound 00086 }; 00087 <a name="l00088"></a><a class="code" href="classXMLElementDecl.html#w16">00088</a> <span class="keyword">enum</span> CharDataOpts 00089 { 00090 NoCharData 00091 , SpacesOk 00092 , AllCharData 00093 }; 00094 00095 00096 <span class="comment">// -----------------------------------------------------------------------</span> 00097 <span class="comment">// Public static data</span> 00098 <span class="comment">//</span> 00099 <span class="comment">// fgInvalidElemId</span> 00100 <span class="comment">// A value to represent an invalid element node id.</span> 00101 <span class="comment">//</span> 00102 <span class="comment">// fgPCDataElemId</span> 00103 <span class="comment">// This is the value to use to represent a PCDATA node when an</span> 00104 <span class="comment">// element id is required.</span> 00105 <span class="comment">//</span> 00106 <span class="comment">// fgPCDataElemName</span> 00107 <span class="comment">// This is the value to use to represent a PCDATA node when an</span> 00108 <span class="comment">// element name is required.</span> 00109 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00110"></a><a class="code" href="classXMLElementDecl.html#s0">00110</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fgInvalidElemId; <a name="l00111"></a><a class="code" href="classXMLElementDecl.html#s1">00111</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fgPCDataElemId; <a name="l00112"></a><a class="code" href="classXMLElementDecl.html#s2">00112</a> <span class="keyword">static</span> <span class="keyword">const</span> XMLCh fgPCDataElemName[]; 00113 00114 00115 00116 <span class="comment">// -----------------------------------------------------------------------</span> 00117 <span class="comment">// Destructor</span> 00118 <span class="comment">// -----------------------------------------------------------------------</span> 00121 <span class="comment"></span> <span class="keyword">virtual</span> ~XMLElementDecl(); 00123 00124 00125 <span class="comment">// -----------------------------------------------------------------------</span> 00126 <span class="comment">// The virtual element decl interface</span> 00127 <span class="comment">// -----------------------------------------------------------------------</span> 00128 00131 00162 <span class="keyword">virtual</span> <a class="code" href="classXMLAttDef.html">XMLAttDef</a>* findAttr 00163 ( 00164 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> qName 00165 , <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uriId 00166 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseName 00167 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> prefix 00168 , <span class="keyword">const</span> LookupOpts options 00169 , <span class="keywordtype">bool</span>& wasAdded 00170 ) <span class="keyword">const</span> = 0; 00171 00183 <span class="keyword">virtual</span> <a class="code" href="classXMLAttDefList.html">XMLAttDefList</a>& getAttDefList() <span class="keyword">const </span>= 0; 00184 00192 <span class="keyword">virtual</span> CharDataOpts getCharDataOpts() <span class="keyword">const </span>= 0; 00193 00200 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> hasAttDefs() <span class="keyword">const </span>= 0; 00201 00209 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> resetDefs() = 0; 00210 00218 <span class="keyword">virtual</span> <span class="keyword">const</span> ContentSpecNode* getContentSpec() <span class="keyword">const </span>= 0; 00219 00225 <span class="keyword">virtual</span> ContentSpecNode* getContentSpec() = 0; 00226 00236 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setContentSpec(ContentSpecNode* toAdopt) = 0; 00237 00249 <span class="keyword">virtual</span> <a class="code" href="classXMLContentModel.html">XMLContentModel</a>* getContentModel() = 0; 00250 00262 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setContentModel(<a class="code" href="classXMLContentModel.html">XMLContentModel</a>* <span class="keyword">const</span> newModelToAdopt) = 0; 00263 00276 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getFormattedContentModel () <span class="keyword">const </span>= 0; 00277 00279 00280 00281 <span class="comment">// -----------------------------------------------------------------------</span> 00282 <span class="comment">// Getter methods</span> 00283 <span class="comment">// -----------------------------------------------------------------------</span> 00284 00287 00295 <span class="keyword">const</span> XMLCh* getBaseName() <span class="keyword">const</span>; 00296 XMLCh* getBaseName(); 00297 00304 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getURI() <span class="keyword">const</span>; 00305 00313 <span class="keyword">const</span> <a class="code" href="classQName.html">QName</a>* getElementName() <span class="keyword">const</span>; 00314 <a class="code" href="classQName.html">QName</a>* getElementName(); 00315 00324 <span class="keyword">const</span> XMLCh* getFullName() <span class="keyword">const</span>; 00325 00337 CreateReasons getCreateReason() <span class="keyword">const</span>; 00338 00348 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getId() <span class="keyword">const</span>; 00349 00350 00355 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDOMTypeInfoUri() <span class="keyword">const </span>= 0; 00356 00361 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDOMTypeInfoName() <span class="keyword">const </span>= 0; 00362 00363 00373 <span class="keywordtype">bool</span> isDeclared() <span class="keyword">const</span>; 00374 00383 <span class="keywordtype">bool</span> isExternal() <span class="keyword">const</span>; 00384 00392 <a class="code" href="classMemoryManager.html">MemoryManager</a>* getMemoryManager() <span class="keyword">const</span>; 00393 00395 00396 00397 <span class="comment">// -----------------------------------------------------------------------</span> 00398 <span class="comment">// Setter methods</span> 00399 <span class="comment">// -----------------------------------------------------------------------</span> 00400 00403 00414 <span class="keywordtype">void</span> setElementName(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> prefix 00415 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> localPart 00416 , <span class="keyword">const</span> <span class="keywordtype">int</span> uriId ); 00417 00427 <span class="keywordtype">void</span> setElementName(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> rawName 00428 , <span class="keyword">const</span> <span class="keywordtype">int</span> uriId ); 00429 00438 <span class="keywordtype">void</span> setElementName(<span class="keyword">const</span> <a class="code" href="classQName.html">QName</a>* <span class="keyword">const</span> elementName); 00439 00450 <span class="keywordtype">void</span> setCreateReason(<span class="keyword">const</span> CreateReasons newReason); 00451 00458 <span class="keywordtype">void</span> setId(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> newId); 00459 00460 00464 <span class="keywordtype">void</span> setExternalElemDeclaration(<span class="keyword">const</span> <span class="keywordtype">bool</span> aValue); 00465 00467 00468 00469 <span class="comment">// -----------------------------------------------------------------------</span> 00470 <span class="comment">// Miscellaneous methods</span> 00471 <span class="comment">// -----------------------------------------------------------------------</span> 00472 00475 00477 00478 <span class="comment">/***</span> 00479 <span class="comment"> * Support for Serialization/De-serialization</span> 00480 <span class="comment"> ***/</span> 00481 DECL_XSERIALIZABLE(XMLElementDecl) 00482 <a name="l00483"></a><a class="code" href="classXMLElementDecl.html#w17">00483</a> enum objectType 00484 { 00485 Schema 00486 , DTD 00487 , UnKnown 00488 }; 00489 00490 <span class="keyword">virtual</span> XMLElementDecl::objectType getObjectType() <span class="keyword">const </span>= 0; 00491 00492 <span class="keyword">static</span> <span class="keywordtype">void</span> storeElementDecl(XSerializeEngine& serEng 00493 , XMLElementDecl* <span class="keyword">const</span> element); 00494 00495 <span class="keyword">static</span> XMLElementDecl* loadElementDecl(XSerializeEngine& serEng); 00496 00497 <span class="keyword">protected</span> : 00498 <span class="comment">// -----------------------------------------------------------------------</span> 00499 <span class="comment">// Hidden constructors</span> 00500 <span class="comment">// -----------------------------------------------------------------------</span> 00501 XMLElementDecl(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager); 00502 00503 <span class="keyword">private</span> : 00504 <span class="comment">// -----------------------------------------------------------------------</span> 00505 <span class="comment">// Unimplemented constructors and operators</span> 00506 <span class="comment">// -----------------------------------------------------------------------</span> 00507 XMLElementDecl(<span class="keyword">const</span> XMLElementDecl&); 00508 XMLElementDecl& operator=(<span class="keyword">const</span> XMLElementDecl&); 00509 00510 00511 <span class="comment">// -----------------------------------------------------------------------</span> 00512 <span class="comment">// Data members</span> 00513 <span class="comment">//</span> 00514 <span class="comment">// fElementName</span> 00515 <span class="comment">// This is the name of the element decl.</span> 00516 <span class="comment">//</span> 00517 <span class="comment">// fCreateReason</span> 00518 <span class="comment">// We sometimes have to put an element decl object into the elem</span> 00519 <span class="comment">// decl pool before the element's declaration is seen, such as when</span> 00520 <span class="comment">// its used in another element's content model or an att list is</span> 00521 <span class="comment">// seen for it. This flag tells us whether its been declared, and</span> 00522 <span class="comment">// if not why it had to be created.</span> 00523 <span class="comment">//</span> 00524 <span class="comment">// fId</span> 00525 <span class="comment">// The unique id of this element. This is created by the derived</span> 00526 <span class="comment">// class, or more accurately the grammar that owns the objects</span> 00527 <span class="comment">// of the derived types. But, since they all have to have them, we</span> 00528 <span class="comment">// let them all store the id here. It is defaulted to have the</span> 00529 <span class="comment">// value fgInvalidElem until explicitly set.</span> 00530 <span class="comment">//</span> 00531 <span class="comment">// fExternalElement</span> 00532 <span class="comment">// This flag indicates whether or the element was declared externally.</span> 00533 <span class="comment">// -----------------------------------------------------------------------</span> 00534 <a class="code" href="classMemoryManager.html">MemoryManager</a>* fMemoryManager; 00535 <a class="code" href="classQName.html">QName</a>* fElementName; 00536 CreateReasons fCreateReason; 00537 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fId; 00538 <span class="keywordtype">bool</span> fExternalElement; 00539 }; 00540 00541 00542 <span class="comment">// ---------------------------------------------------------------------------</span> 00543 <span class="comment">// XMLElementDecl: Getter methods</span> 00544 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00545"></a><a class="code" href="classXMLElementDecl.html#z524_0">00545</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLElementDecl.html#z524_0">XMLElementDecl::getBaseName</a>()<span class="keyword"> const</span> 00546 <span class="keyword"></span>{ 00547 <span class="keywordflow">return</span> fElementName-><a class="code" href="classQName.html#a7">getLocalPart</a>(); 00548 } 00549 <a name="l00550"></a><a class="code" href="classXMLElementDecl.html#z524_1">00550</a> <span class="keyword">inline</span> XMLCh* <a class="code" href="classXMLElementDecl.html#z524_0">XMLElementDecl::getBaseName</a>() 00551 { 00552 <span class="keywordflow">return</span> fElementName-><a class="code" href="classQName.html#a7">getLocalPart</a>(); 00553 } 00554 <a name="l00555"></a><a class="code" href="classXMLElementDecl.html#z524_2">00555</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classXMLElementDecl.html#z524_2">XMLElementDecl::getURI</a>()<span class="keyword"> const</span> 00556 <span class="keyword"></span>{ 00557 <span class="keywordflow">return</span> fElementName-><a class="code" href="classQName.html#a9">getURI</a>(); 00558 } 00559 <a name="l00560"></a><a class="code" href="classXMLElementDecl.html#z524_3">00560</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classQName.html">QName</a>* <a class="code" href="classXMLElementDecl.html#z524_3">XMLElementDecl::getElementName</a>()<span class="keyword"> const</span> 00561 <span class="keyword"></span>{ 00562 <span class="keywordflow">return</span> fElementName; 00563 } 00564 <a name="l00565"></a><a class="code" href="classXMLElementDecl.html#z524_4">00565</a> <span class="keyword">inline</span> <a class="code" href="classQName.html">QName</a>* <a class="code" href="classXMLElementDecl.html#z524_3">XMLElementDecl::getElementName</a>() 00566 { 00567 <span class="keywordflow">return</span> fElementName; 00568 } 00569 <a name="l00570"></a><a class="code" href="classXMLElementDecl.html#z524_5">00570</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLElementDecl.html#z524_5">XMLElementDecl::getFullName</a>()<span class="keyword"> const</span> 00571 <span class="keyword"></span>{ 00572 <span class="keywordflow">return</span> fElementName-><a class="code" href="classQName.html#a10">getRawName</a>(); 00573 } 00574 <a name="l00575"></a><a class="code" href="classXMLElementDecl.html#z524_6">00575</a> <span class="keyword">inline</span> <a class="code" href="classXMLElementDecl.html#w14">XMLElementDecl::CreateReasons</a> <a class="code" href="classXMLElementDecl.html#z524_6">XMLElementDecl::getCreateReason</a>()<span class="keyword"> const</span> 00576 <span class="keyword"></span>{ 00577 <span class="keywordflow">return</span> fCreateReason; 00578 } 00579 <a name="l00580"></a><a class="code" href="classXMLElementDecl.html#z524_7">00580</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classXMLElementDecl.html#z524_7">XMLElementDecl::getId</a>()<span class="keyword"> const</span> 00581 <span class="keyword"></span>{ 00582 <span class="keywordflow">return</span> fId; 00583 } 00584 <a name="l00585"></a><a class="code" href="classXMLElementDecl.html#z524_10">00585</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLElementDecl.html#z524_10">XMLElementDecl::isDeclared</a>()<span class="keyword"> const</span> 00586 <span class="keyword"></span>{ 00587 <span class="keywordflow">return</span> (fCreateReason == <a class="code" href="classXMLElementDecl.html#w14w1">Declared</a>); 00588 } 00589 00590 <a name="l00591"></a><a class="code" href="classXMLElementDecl.html#z524_11">00591</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLElementDecl.html#z524_11">XMLElementDecl::isExternal</a>()<span class="keyword"> const</span> 00592 <span class="keyword"></span>{ 00593 <span class="keywordflow">return</span> fExternalElement; 00594 } 00595 <a name="l00596"></a><a class="code" href="classXMLElementDecl.html#z524_12">00596</a> <span class="keyword">inline</span> <a class="code" href="classMemoryManager.html">MemoryManager</a>* <a class="code" href="classXMLElementDecl.html#z524_12">XMLElementDecl::getMemoryManager</a>()<span class="keyword"> const</span> 00597 <span class="keyword"></span>{ 00598 <span class="keywordflow">return</span> fMemoryManager; 00599 } 00600 00601 00602 <span class="comment">// ---------------------------------------------------------------------------</span> 00603 <span class="comment">// XMLElementDecl: Setter methods</span> 00604 <span class="comment">// ---------------------------------------------------------------------------</span> 00605 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00606"></a><a class="code" href="classXMLElementDecl.html#z526_3">00606</a> <a class="code" href="classXMLElementDecl.html#z526_3">XMLElementDecl::setCreateReason</a>(<span class="keyword">const</span> XMLElementDecl::CreateReasons newReason) 00607 { 00608 fCreateReason = newReason; 00609 } 00610 <a name="l00611"></a><a class="code" href="classXMLElementDecl.html#z526_4">00611</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLElementDecl.html#z526_4">XMLElementDecl::setId</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> newId) 00612 { 00613 fId = newId; 00614 } 00615 00616 <a name="l00617"></a><a class="code" href="classXMLElementDecl.html#z526_5">00617</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLElementDecl.html#z526_5">XMLElementDecl::setExternalElemDeclaration</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> aValue) 00618 { 00619 fExternalElement = aValue; 00620 } 00621 00622 <a class="code" href="XercesDefs_8hpp.html#a4">XERCES_CPP_NAMESPACE_END</a> 00623 00624 <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>