Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 3edf0460bd0634d0868f9e30d85505ae > files > 300

xerces-c-manual-1.5.2-1mdk.i586.rpm

<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>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="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-8');" onMouseOver="rolloverOn('side-ext-8');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-8" onLoad="rolloverLoad('side-ext-8','../graphics/ext-8-label-2.jpg','../graphics/ext-8-label-3.jpg');" src="../graphics/ext-8-label-3.jpg" vspace="0" width="120"></A><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="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" 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>

  <IMG alt="API Docs" border="0" height="12" hspace="0" src="../graphics/api-label-1.jpg" vspace="0" width="120"><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="../schema.html" onMouseOut="rolloverOff('side-schema');" onMouseOver="rolloverOn('side-schema');"><IMG alt="Schema" border="0" height="12" hspace="0" name="side-schema" onLoad="rolloverLoad('side-schema','../graphics/schema-label-2.jpg','../graphics/schema-label-3.jpg');" src="../graphics/schema-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="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration" 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="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Releases" 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>
  <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="../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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
  <A href="../y2k.html" onMouseOut="rolloverOff('side-y2k');" onMouseOver="rolloverOn('side-y2k');"><IMG alt="Y2K Compliance" border="0" height="12" hspace="0" name="side-y2k" onLoad="rolloverLoad('side-y2k','../graphics/y2k-label-2.jpg','../graphics/y2k-label-3.jpg');" src="../graphics/y2k-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://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-50');" onMouseOver="rolloverOn('side-ext-50');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-50" onLoad="rolloverLoad('side-ext-50','../graphics/ext-50-label-2.jpg','../graphics/ext-50-label-3.jpg');" src="../graphics/ext-50-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-52');" onMouseOver="rolloverOn('side-ext-52');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-52" onLoad="rolloverLoad('side-ext-52','../graphics/ext-52-label-2.jpg','../graphics/ext-52-label-3.jpg');" src="../graphics/ext-52-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">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">

	    <P>
<!-- Generated by Doxygen 1.2.4 on Fri Oct 26 10:32:15 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>XMLAttDef.hpp</h1><a href="XMLAttDef_hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * The Apache Software License, Version 1.1</font>
00003 <font class="comment"> *</font>
00004 <font class="comment"> * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights</font>
00005 <font class="comment"> * reserved.</font>
00006 <font class="comment"> *</font>
00007 <font class="comment"> * Redistribution and use in source and binary forms, with or without</font>
00008 <font class="comment"> * modification, are permitted provided that the following conditions</font>
00009 <font class="comment"> * are met:</font>
00010 <font class="comment"> *</font>
00011 <font class="comment"> * 1. Redistributions of source code must retain the above copyright</font>
00012 <font class="comment"> *    notice, this list of conditions and the following disclaimer.</font>
00013 <font class="comment"> *</font>
00014 <font class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</font>
00015 <font class="comment"> *    notice, this list of conditions and the following disclaimer in</font>
00016 <font class="comment"> *    the documentation and/or other materials provided with the</font>
00017 <font class="comment"> *    distribution.</font>
00018 <font class="comment"> *</font>
00019 <font class="comment"> * 3. The end-user documentation included with the redistribution,</font>
00020 <font class="comment"> *    if any, must include the following acknowledgment:</font>
00021 <font class="comment"> *       "This product includes software developed by the</font>
00022 <font class="comment"> *        Apache Software Foundation (http://www.apache.org/)."</font>
00023 <font class="comment"> *    Alternately, this acknowledgment may appear in the software itself,</font>
00024 <font class="comment"> *    if and wherever such third-party acknowledgments normally appear.</font>
00025 <font class="comment"> *</font>
00026 <font class="comment"> * 4. The names "Xerces" and "Apache Software Foundation" must</font>
00027 <font class="comment"> *    not be used to endorse or promote products derived from this</font>
00028 <font class="comment"> *    software without prior written permission. For written</font>
00029 <font class="comment"> *    permission, please contact apache\@apache.org.</font>
00030 <font class="comment"> *</font>
00031 <font class="comment"> * 5. Products derived from this software may not be called "Apache",</font>
00032 <font class="comment"> *    nor may "Apache" appear in their name, without prior written</font>
00033 <font class="comment"> *    permission of the Apache Software Foundation.</font>
00034 <font class="comment"> *</font>
00035 <font class="comment"> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font>
00036 <font class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font>
00037 <font class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font>
00038 <font class="comment"> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font>
00039 <font class="comment"> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font>
00040 <font class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font>
00041 <font class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font>
00042 <font class="comment"> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font>
00043 <font class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font>
00044 <font class="comment"> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font>
00045 <font class="comment"> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font>
00046 <font class="comment"> * SUCH DAMAGE.</font>
00047 <font class="comment"> * ====================================================================</font>
00048 <font class="comment"> *</font>
00049 <font class="comment"> * This software consists of voluntary contributions made by many</font>
00050 <font class="comment"> * individuals on behalf of the Apache Software Foundation, and was</font>
00051 <font class="comment"> * originally based on software copyright (c) 1999, International</font>
00052 <font class="comment"> * Business Machines, Inc., http://www.ibm.com .  For more information</font>
00053 <font class="comment"> * on the Apache Software Foundation, please see</font>
00054 <font class="comment"> * &lt;http://www.apache.org/&gt;.</font>
00055 <font class="comment"> */</font>
00056 
00057 <font class="comment">/*</font>
00058 <font class="comment"> * $Log: XMLAttDef.hpp,v $</font>
00059 <font class="comment"> * Revision 1.12  2001/08/09 15:23:37  knoaman</font>
00060 <font class="comment"> * add support for &lt;anyAttribute&gt; declaration.</font>
00061 <font class="comment"> *</font>
00062 <font class="comment"> * Revision 1.11  2001/06/21 14:25:26  knoaman</font>
00063 <font class="comment"> * Fix for bug 1946</font>
00064 <font class="comment"> *</font>
00065 <font class="comment"> * Revision 1.10  2001/05/11 13:25:31  tng</font>
00066 <font class="comment"> * Copyright update.</font>
00067 <font class="comment"> *</font>
00068 <font class="comment"> * Revision 1.9  2001/02/27 18:48:20  tng</font>
00069 <font class="comment"> * Schema: Add SchemaAttDef, SchemaElementDecl, SchemaAttDefList.</font>
00070 <font class="comment"> *</font>
00071 <font class="comment"> * Revision 1.8  2000/12/14 18:49:56  tng</font>
00072 <font class="comment"> * Fix API document generation warning: "Warning: end of member group without matching begin"</font>
00073 <font class="comment"> *</font>
00074 <font class="comment"> * Revision 1.7  2000/11/30 18:22:38  andyh</font>
00075 <font class="comment"> * reuseValidator - fix bugs (spurious errors) that occured on reuse due to</font>
00076 <font class="comment"> * pools already containing some items.  Fixed by Tinny Ng.</font>
00077 <font class="comment"> *</font>
00078 <font class="comment"> * Revision 1.6  2000/07/07 22:23:38  jpolast</font>
00079 <font class="comment"> * remove useless getKey() functions.</font>
00080 <font class="comment"> *</font>
00081 <font class="comment"> * Revision 1.5  2000/02/24 20:00:22  abagchi</font>
00082 <font class="comment"> * Swat for removing Log from API docs</font>
00083 <font class="comment"> *</font>
00084 <font class="comment"> * Revision 1.4  2000/02/16 23:03:48  roddey</font>
00085 <font class="comment"> * More documentation updates</font>
00086 <font class="comment"> *</font>
00087 <font class="comment"> * Revision 1.3  2000/02/15 01:21:30  roddey</font>
00088 <font class="comment"> * Some initial documentation improvements. More to come...</font>
00089 <font class="comment"> *</font>
00090 <font class="comment"> * Revision 1.2  2000/02/06 07:47:46  rahulj</font>
00091 <font class="comment"> * Year 2K copyright swat.</font>
00092 <font class="comment"> *</font>
00093 <font class="comment"> * Revision 1.1.1.1  1999/11/09 01:08:27  twl</font>
00094 <font class="comment"> * Initial checkin</font>
00095 <font class="comment"> *</font>
00096 <font class="comment"> * Revision 1.2  1999/11/08 20:44:34  rahul</font>
00097 <font class="comment"> * Swat for adding in Product name and CVS comment log variable.</font>
00098 <font class="comment"> *</font>
00099 <font class="comment"> */</font>
00100 
00101 <font class="preprocessor">#if !defined(ATTDEF_HPP)</font>
<a name="l00102"></a><a class="code" href="XMLAttDef_hpp.html#a0">00102</a> <font class="preprocessor"></font><font class="preprocessor">#define ATTDEF_HPP</font>
00103 <font class="preprocessor"></font>
00104 <font class="preprocessor">#include &lt;<a class="code" href="XMLString_hpp.html">util/XMLString.hpp</a>&gt;</font>
00105 
00106 <font class="keyword">class </font><a class="code" href="class_XMLAttr.html">XMLAttr</a>;
00107 
<a name="l00126"></a><a class="code" href="class_XMLAttDef.html">00126</a> <font class="keyword">class </font> <a class="code" href="class_XMLAttDef.html">XMLAttDef</a>
00127 {
00128 <font class="keyword">public</font>:
00129     <font class="comment">// -----------------------------------------------------------------------</font>
00130     <font class="comment">//  Class specific types</font>
00131     <font class="comment">//</font>
00132     <font class="comment">//  AttTypes</font>
00133     <font class="comment">//      The list of possible types that an attribute can have, according</font>
00134     <font class="comment">//      to the XML 1.0 spec and schema.</font>
00135     <font class="comment">//</font>
00136     <font class="comment">//  DefAttTypes</font>
00137     <font class="comment">//      The modifiers that an attribute decl can have, which indicates</font>
00138     <font class="comment">//      whether instances of that attributes are required, implied, etc..</font>
00139     <font class="comment">//</font>
00140     <font class="comment">//  CreateReasons</font>
00141     <font class="comment">//      This type is used to store how an attribute declaration got into</font>
00142     <font class="comment">//      the elementdecl's attribute pool.</font>
00143     <font class="comment">//</font>
00144     <font class="comment">// -----------------------------------------------------------------------</font>
<a name="l00145"></a><a class="code" href="class_XMLAttDef.html#s33">00145</a>     <font class="keyword">enum</font> AttTypes
00146     {
00147         CData               = 0
00148         , ID                = 1
00149         , IDRef             = 2
00150         , IDRefs            = 3
00151         , Entity            = 4
00152         , Entities          = 5
00153         , NmToken           = 6
00154         , NmTokens          = 7
00155         , Notation          = 8
00156         , Enumeration       = 9
00157         , Simple            = 10
00158         , Any_Any           = 11
00159         , Any_Other         = 12
00160         , Any_List          = 13
00161 
00162         , AttTypes_Count
00163         , AttTypes_Min      = 0
00164         , AttTypes_Max      = 13
00165         , AttTypes_Unknown  = -1
00166     };
00167 
<a name="l00168"></a><a class="code" href="class_XMLAttDef.html#s34">00168</a>     <font class="keyword">enum</font> DefAttTypes
00169     {
00170         Default                  = 0
00171         , Required               = 1
00172         , Implied                = 2
00173         , Prohibited             = 3
00174         , Fixed                  = 4
00175         , Required_And_Fixed     = 5
00176         , ProcessContents_Strict = 6
00177         , ProcessContents_Lax    = 7
00178         , ProcessContents_Skip   = 8
00179 
00180         , DefAttTypes_Count
00181         , DefAttTypes_Min   = 0
00182         , DefAttTypes_Max   = 8
00183         , DefAttTypes_Unknown = -1
00184     };
00185 
<a name="l00186"></a><a class="code" href="class_XMLAttDef.html#s35">00186</a>     <font class="keyword">enum</font> CreateReasons
00187     {
00188         NoReason
00189         , JustFaultIn
00190     };
00191 
00192     <font class="comment">// -----------------------------------------------------------------------</font>
00193     <font class="comment">//  Public static data members</font>
00194     <font class="comment">// -----------------------------------------------------------------------</font>
<a name="l00195"></a><a class="code" href="class_XMLAttDef.html#p0">00195</a>     <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> fgInvalidAttrId;
00196 
00197 
00198     <font class="comment">// -----------------------------------------------------------------------</font>
00199     <font class="comment">//  Public, static methods</font>
00200     <font class="comment">// -----------------------------------------------------------------------</font>
00201 
00204 
00215     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#d0">getAttTypeString</a>(<font class="keyword">const</font> AttTypes attrType);
00216 
00227     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#d1">getDefAttTypeString</a>(<font class="keyword">const</font> DefAttTypes attrType);
00228 
00230 
00231 
00232     <font class="comment">// -----------------------------------------------------------------------</font>
00233     <font class="comment">//  Destructor</font>
00234     <font class="comment">// -----------------------------------------------------------------------</font>
00235 
00238 
00242     <font class="keyword">virtual</font> <a class="code" href="class_XMLAttDef.html#a0">~XMLAttDef</a>();
00244 
00245 
00246     <font class="comment">// -----------------------------------------------------------------------</font>
00247     <font class="comment">//  The virtual attribute def interface</font>
00248     <font class="comment">// -----------------------------------------------------------------------</font>
00249 
00252 
00261     <font class="keyword">virtual</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#a1">getFullName</a>() <font class="keyword">const</font> = 0;
00262 
00264 
00265 
00266     <font class="comment">// -----------------------------------------------------------------------</font>
00267     <font class="comment">//  Getter methods</font>
00268     <font class="comment">// -----------------------------------------------------------------------</font>
00269 
00272 
00281     DefAttTypes <a class="code" href="class_XMLAttDef.html#a2">getDefaultType</a>() <font class="keyword">const</font>;
00282 
00292     <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#a3">getEnumeration</a>() <font class="keyword">const</font>;
00293 
00302     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="class_XMLAttDef.html#a4">getId</a>() <font class="keyword">const</font>;
00303 
00317     <font class="keywordtype">bool</font> <a class="code" href="class_XMLAttDef.html#a5">getProvided</a>() <font class="keyword">const</font>;
00318 
00328     AttTypes <a class="code" href="class_XMLAttDef.html#a6">getType</a>() <font class="keyword">const</font>;
00329 
00339     <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#a7">getValue</a>() <font class="keyword">const</font>;
00340 
00349     CreateReasons <a class="code" href="class_XMLAttDef.html#a8">getCreateReason</a>() <font class="keyword">const</font>;
00350 
00358     <font class="keywordtype">bool</font> <a class="code" href="class_XMLAttDef.html#a9">isExternal</a>() <font class="keyword">const</font>;
00359 
00361 
00362 
00363     <font class="comment">// -----------------------------------------------------------------------</font>
00364     <font class="comment">//  Setter methods</font>
00365     <font class="comment">// -----------------------------------------------------------------------</font>
00366 
00369 
00378     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a10">setDefaultType</a>(<font class="keyword">const</font> XMLAttDef::DefAttTypes newValue);
00379 
00388     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a11">setId</a>(<font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> newId);
00389 
00398     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a12">setProvided</a>(<font class="keyword">const</font> <font class="keywordtype">bool</font> newValue);
00399 
00407     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a13">setType</a>(<font class="keyword">const</font> XMLAttDef::AttTypes newValue);
00408 
00419     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a14">setValue</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newValue);
00420 
00431     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a15">setEnumeration</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newValue);
00432 
00438     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a16">setCreateReason</a>(<font class="keyword">const</font> CreateReasons newReason);
00439 
00443     <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a17">setExternalAttDeclaration</a>(<font class="keyword">const</font> <font class="keywordtype">bool</font> aValue);
00444 
00446 
00447 <font class="keyword">protected</font> :
00448     <font class="comment">// -----------------------------------------------------------------------</font>
00449     <font class="comment">//  Hidden constructors</font>
00450     <font class="comment">// -----------------------------------------------------------------------</font>
00451     <a class="code" href="class_XMLAttDef.html">XMLAttDef</a>
00452     (
00453         <font class="keyword">const</font>   AttTypes            type = CData
00454         , <font class="keyword">const</font> DefAttTypes         defType = Implied
00455     );
00456     <a class="code" href="class_XMLAttDef.html">XMLAttDef</a>
00457     (
00458         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>        attValue
00459         , <font class="keyword">const</font> AttTypes            type
00460         , <font class="keyword">const</font> DefAttTypes         defType
00461         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        enumValues = 0
00462     );
00463 
00464 
00465 <font class="keyword">private</font> :
00466     <font class="comment">// -----------------------------------------------------------------------</font>
00467     <font class="comment">//  Unimplemented constructors and operators</font>
00468     <font class="comment">// -----------------------------------------------------------------------</font>
00469     <a class="code" href="class_XMLAttDef.html#b0">XMLAttDef</a>(<font class="keyword">const</font> <a class="code" href="class_XMLAttDef.html">XMLAttDef</a>&amp;);
00470     <font class="keywordtype">void</font> operator=(<font class="keyword">const</font> <a class="code" href="class_XMLAttDef.html">XMLAttDef</a>&amp;);
00471 
00472 
00473     <font class="comment">// -----------------------------------------------------------------------</font>
00474     <font class="comment">//  Private helper methods</font>
00475     <font class="comment">// -----------------------------------------------------------------------</font>
00476     <font class="keywordtype">void</font> cleanUp();
00477 
00478 
00479     <font class="comment">// -----------------------------------------------------------------------</font>
00480     <font class="comment">//  Private data members</font>
00481     <font class="comment">//</font>
00482     <font class="comment">//  fDefaultType</font>
00483     <font class="comment">//      Indicates what, if any, default stuff this attribute has.</font>
00484     <font class="comment">//</font>
00485     <font class="comment">//  fEnumeration</font>
00486     <font class="comment">//      If its an enumeration, this is the list of values as space</font>
00487     <font class="comment">//      separated values.</font>
00488     <font class="comment">//</font>
00489     <font class="comment">//  fId</font>
00490     <font class="comment">//      This is the unique id of this attribute, given to it when its put</font>
00491     <font class="comment">//      into the validator's attribute decl pool. It defaults to the</font>
00492     <font class="comment">//      special value XMLAttrDef::fgInvalidAttrId.</font>
00493     <font class="comment">//</font>
00494     <font class="comment">//  fProvided</font>
00495     <font class="comment">//      This field is really for use by the scanner. It is used to track</font>
00496     <font class="comment">//      which of the attributes of an element were provided. Any marked</font>
00497     <font class="comment">//      as not provided (after scanning the start tag) and having a</font>
00498     <font class="comment">//      default type of Required, is in error.</font>
00499     <font class="comment">//</font>
00500     <font class="comment">//  fType</font>
00501     <font class="comment">//      The type of attribute, which is one of the AttTypes values.</font>
00502     <font class="comment">//</font>
00503     <font class="comment">//  fValue</font>
00504     <font class="comment">//      This is the value of the attribute, which is the default value</font>
00505     <font class="comment">//      given in the attribute declaration.</font>
00506     <font class="comment">//</font>
00507     <font class="comment">//  fCreateReason</font>
00508     <font class="comment">//      This flag tells us how this attribute got created.  Sometimes even</font>
00509     <font class="comment">//      the attribute was not declared for the element, we want to fault</font>
00510     <font class="comment">//      fault it into the pool to avoid lots of redundant errors.</font>
00511     <font class="comment">//</font>
00512     <font class="comment">//  fExternalAttribute</font>
00513     <font class="comment">//      This flag indicates whether or not the attribute was declared externally.</font>
00514     <font class="comment">// -----------------------------------------------------------------------</font>
00515     DefAttTypes     fDefaultType;
00516     XMLCh*          fEnumeration;
00517     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    fId;
00518     <font class="keywordtype">bool</font>            fProvided;
00519     AttTypes        fType;
00520     XMLCh*          fValue;
00521     CreateReasons   fCreateReason;
00522     <font class="keywordtype">bool</font>            fExternalAttribute;
00523 };
00524 
00525 
00526 
00527 <font class="comment">// ---------------------------------------------------------------------------</font>
00528 <font class="comment">//  Getter methods</font>
00529 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00530"></a><a class="code" href="class_XMLAttDef.html#a2">00530</a> <font class="keyword">inline</font> XMLAttDef::DefAttTypes <a class="code" href="class_XMLAttDef.html#a2">XMLAttDef::getDefaultType</a>()<font class="keyword"> const</font>
00531 <font class="keyword"></font>{
00532     <font class="keywordflow">return</font> fDefaultType;
00533 }
00534 
<a name="l00535"></a><a class="code" href="class_XMLAttDef.html#a3">00535</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#a3">XMLAttDef::getEnumeration</a>()<font class="keyword"> const</font>
00536 <font class="keyword"></font>{
00537     <font class="keywordflow">return</font> fEnumeration;
00538 }
00539 
<a name="l00540"></a><a class="code" href="class_XMLAttDef.html#a4">00540</a> <font class="keyword">inline</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="class_XMLAttDef.html#a4">XMLAttDef::getId</a>()<font class="keyword"> const</font>
00541 <font class="keyword"></font>{
00542     <font class="keywordflow">return</font> fId;
00543 }
00544 
<a name="l00545"></a><a class="code" href="class_XMLAttDef.html#a5">00545</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="class_XMLAttDef.html#a5">XMLAttDef::getProvided</a>()<font class="keyword"> const</font>
00546 <font class="keyword"></font>{
00547     <font class="keywordflow">return</font> fProvided;
00548 }
00549 
<a name="l00550"></a><a class="code" href="class_XMLAttDef.html#a6">00550</a> <font class="keyword">inline</font> XMLAttDef::AttTypes <a class="code" href="class_XMLAttDef.html#a6">XMLAttDef::getType</a>()<font class="keyword"> const</font>
00551 <font class="keyword"></font>{
00552     <font class="keywordflow">return</font> fType;
00553 }
00554 
<a name="l00555"></a><a class="code" href="class_XMLAttDef.html#a7">00555</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLAttDef.html#a7">XMLAttDef::getValue</a>()<font class="keyword"> const</font>
00556 <font class="keyword"></font>{
00557     <font class="keywordflow">return</font> fValue;
00558 }
00559 
<a name="l00560"></a><a class="code" href="class_XMLAttDef.html#a8">00560</a> <font class="keyword">inline</font> XMLAttDef::CreateReasons <a class="code" href="class_XMLAttDef.html#a8">XMLAttDef::getCreateReason</a>()<font class="keyword"> const</font>
00561 <font class="keyword"></font>{
00562     <font class="keywordflow">return</font> fCreateReason;
00563 }
00564 
<a name="l00565"></a><a class="code" href="class_XMLAttDef.html#a9">00565</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="class_XMLAttDef.html#a9">XMLAttDef::isExternal</a>()<font class="keyword"> const</font>
00566 <font class="keyword"></font>{
00567     <font class="keywordflow">return</font> fExternalAttribute;
00568 }
00569 
00570 
00571 <font class="comment">// ---------------------------------------------------------------------------</font>
00572 <font class="comment">//  XMLAttDef: Setter methods</font>
00573 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00574"></a><a class="code" href="class_XMLAttDef.html#a10">00574</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a10">XMLAttDef::setDefaultType</a>(<font class="keyword">const</font> XMLAttDef::DefAttTypes newValue)<font class="keyword"></font>
00575 <font class="keyword"></font>{
00576     fDefaultType = newValue;
00577 }
00578 
<a name="l00579"></a><a class="code" href="class_XMLAttDef.html#a15">00579</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a15">XMLAttDef::setEnumeration</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newValue)<font class="keyword"></font>
00580 <font class="keyword"></font>{
00581     <font class="keyword">delete</font> [] fEnumeration;
00582 
00583     <font class="keywordflow">if</font> (newValue) {
00584         fEnumeration = <a class="code" href="class_XMLString.html#d39">XMLString::replicate</a>(newValue);
00585     }
00586     <font class="keywordflow">else</font> {
00587         fEnumeration = 0;
00588     }
00589 }
00590 
<a name="l00591"></a><a class="code" href="class_XMLAttDef.html#a11">00591</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a11">XMLAttDef::setId</a>(<font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> newId)<font class="keyword"></font>
00592 <font class="keyword"></font>{
00593     fId = newId;
00594 }
00595 
<a name="l00596"></a><a class="code" href="class_XMLAttDef.html#a12">00596</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a12">XMLAttDef::setProvided</a>(<font class="keyword">const</font> <font class="keywordtype">bool</font> newValue)<font class="keyword"></font>
00597 <font class="keyword"></font>{
00598     fProvided = newValue;
00599 }
00600 
<a name="l00601"></a><a class="code" href="class_XMLAttDef.html#a13">00601</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a13">XMLAttDef::setType</a>(<font class="keyword">const</font> XMLAttDef::AttTypes newValue)<font class="keyword"></font>
00602 <font class="keyword"></font>{
00603     fType = newValue;
00604 }
00605 
<a name="l00606"></a><a class="code" href="class_XMLAttDef.html#a14">00606</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a14">XMLAttDef::setValue</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newValue)<font class="keyword"></font>
00607 <font class="keyword"></font>{
00608     <font class="keyword">delete</font> [] fValue;
00609     fValue = <a class="code" href="class_XMLString.html#d39">XMLString::replicate</a>(newValue);
00610 }
00611 
00612 <font class="keyword">inline</font> <font class="keywordtype">void</font>
<a name="l00613"></a><a class="code" href="class_XMLAttDef.html#a16">00613</a> <a class="code" href="class_XMLAttDef.html#a16">XMLAttDef::setCreateReason</a>(<font class="keyword">const</font> XMLAttDef::CreateReasons newReason)<font class="keyword"></font>
00614 <font class="keyword"></font>{
00615     fCreateReason = newReason;
00616 }
00617 
<a name="l00618"></a><a class="code" href="class_XMLAttDef.html#a17">00618</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="class_XMLAttDef.html#a17">XMLAttDef::setExternalAttDeclaration</a>(<font class="keyword">const</font> <font class="keywordtype">bool</font> aValue)<font class="keyword"></font>
00619 <font class="keyword"></font>{
00620     fExternalAttribute = aValue;
00621 }
00622 
00623 <font class="preprocessor">#endif</font>
</font></div></pre>    </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"></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
              Copyright &copy; 2000 The Apache Software Foundation.
              All Rights Reserved.
            </I></FONT></TD></TR></TABLE></BODY></HTML>