source: NonGTP/Xerces/xerces/doc/html/apiDocs/XMLGrammarPool_8hpp-source.html @ 358

Revision 358, 33.7 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>XMLGrammarPool.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>
2  <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>
3
4  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
5
6  <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>
7  <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>
8  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
9  <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>
10  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
11  <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>
12
13  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
14  <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> 
15  <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>
16  <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> 
17
18  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> 
19  <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
20
21  <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>
22  <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>
23
24  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
25
26  <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>
27  <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> 
28  <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>
29
30  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
31
32  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
33
34  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" 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>
35
36
37<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>
38    <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">
39
40            <P>
41<!-- Generated by Doxygen 1.2.14 -->
42<center>
43<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>
44<hr><h1>XMLGrammarPool.hpp</h1><a href="XMLGrammarPool_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
4500002 <font class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</font>
4600003 <font class="comment"> * </font>
4700004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
4800005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
4900006 <font class="comment"> * You may obtain a copy of the License at</font>
5000007 <font class="comment"> * </font>
5100008 <font class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</font>
5200009 <font class="comment"> * </font>
5300010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
5400011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
5500012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
5600013 <font class="comment"> * See the License for the specific language governing permissions and</font>
5700014 <font class="comment"> * limitations under the License.</font>
5800015 <font class="comment"> */</font>
5900016
6000017 <font class="comment">/*</font>
6100018 <font class="comment"> * $Log: XMLGrammarPool.hpp,v $</font>
6200019 <font class="comment"> * Revision 1.14  2004/09/29 19:27:07  cargilld</font>
6300020 <font class="comment"> * Fix for Jira-1217: fixing problems with getXSModel.</font>
6400021 <font class="comment"> *</font>
6500022 <font class="comment"> * Revision 1.13  2004/09/08 13:55:59  peiyongz</font>
6600023 <font class="comment"> * Apache License Version 2.0</font>
6700024 <font class="comment"> *</font>
6800025 <font class="comment"> * Revision 1.12  2004/04/07 14:09:22  peiyongz</font>
6900026 <font class="comment"> * systemId (to replace rootElemName) as DTDGrammar Key</font>
7000027 <font class="comment"> *</font>
7100028 <font class="comment"> * Revision 1.11  2003/11/25 15:10:44  jberry</font>
7200029 <font class="comment"> * Eliminate some compiler warnings concerning comments inside of comments</font>
7300030 <font class="comment"> *</font>
7400031 <font class="comment"> * Revision 1.10  2003/11/21 22:34:45  neilg</font>
7500032 <font class="comment"> * More schema component model implementation, thanks to David Cargill.</font>
7600033 <font class="comment"> * In particular, this cleans up and completes the XSModel, XSNamespaceItem,</font>
7700034 <font class="comment"> * XSAttributeDeclaration and XSAttributeGroup implementations.</font>
7800035 <font class="comment"> *</font>
7900036 <font class="comment"> * Revision 1.9  2003/11/06 21:53:52  neilg</font>
8000037 <font class="comment"> * update grammar pool interface so that cacheGrammar(Grammar) can tell the caller whether the grammar was accepted.  Also fix some documentation errors.</font>
8100038 <font class="comment"> *</font>
8200039 <font class="comment"> * Revision 1.8  2003/11/06 15:30:06  neilg</font>
8300040 <font class="comment"> * first part of PSVI/schema component model implementation, thanks to David Cargill.  This covers setting the PSVIHandler on parser objects, as well as implementing XSNotation, XSSimpleTypeDefinition, XSIDCDefinition, and most of XSWildcard, XSComplexTypeDefinition, XSElementDeclaration, XSAttributeDeclaration and XSAttributeUse.</font>
8400041 <font class="comment"> *</font>
8500042 <font class="comment"> * Revision 1.7  2003/11/05 18:19:09  peiyongz</font>
8600043 <font class="comment"> * Documentation update</font>
8700044 <font class="comment"> *</font>
8800045 <font class="comment"> * Revision 1.6  2003/10/29 16:16:48  peiyongz</font>
8900046 <font class="comment"> * GrammarPool' serialization/deserialization support</font>
9000047 <font class="comment"> *</font>
9100048 <font class="comment"> * Revision 1.5  2003/10/10 18:36:03  neilg</font>
9200049 <font class="comment"> * update XMLGrammarPool interface to make expected behaviour of locked pools better specified, and to add the capability to generate XSModels</font>
9300050 <font class="comment"> *</font>
9400051 <font class="comment"> * Revision 1.4  2003/09/16 18:30:54  neilg</font>
9500052 <font class="comment"> * make Grammar pool be responsible for creating and owning URI string pools.  This is one more step towards having grammars be independent of the parsers involved in their creation</font>
9600053 <font class="comment"> *</font>
9700054 <font class="comment"> * Revision 1.3  2003/09/02 08:59:02  gareth</font>
9800055 <font class="comment"> * Added API to get enumerator of grammars.</font>
9900056 <font class="comment"> *</font>
10000057 <font class="comment"> * Revision 1.2  2003/07/31 17:02:42  peiyongz</font>
10100058 <font class="comment"> * Grammar embed GrammarDescription</font>
10200059 <font class="comment"> *</font>
10300060 <font class="comment"> * Revision 1.1  2003/06/20 18:37:39  peiyongz</font>
10400061 <font class="comment"> * Stateless Grammar Pool :: Part I</font>
10500062 <font class="comment"> *</font>
10600063 <font class="comment"> * $Id: XMLGrammarPool.hpp,v 1.14 2004/09/29 19:27:07 cargilld Exp $</font>
10700064 <font class="comment"> *</font>
10800065 <font class="comment"> */</font>
10900066
11000067 <font class="preprocessor">#if !defined(XMLGRAMMARPOOL_HPP)</font>
111<a name="l00068"></a><a class="code" href="XMLGrammarPool_8hpp.html#a0">00068</a> <font class="preprocessor"></font><font class="preprocessor">#define XMLGRAMMARPOOL_HPP</font>
11200069 <font class="preprocessor"></font>
11300070 <font class="preprocessor">#include &lt;<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>&gt;</font>
11400071 <font class="preprocessor">#include &lt;xercesc/util/RefHashTableOf.hpp&gt;</font>
11500072 <font class="preprocessor">#include &lt;<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>&gt;</font>
11600073 <font class="preprocessor">#include &lt;<a class="code" href="XSModel_8hpp.html">xercesc/framework/psvi/XSModel.hpp</a>&gt;</font>
11700074
11800075
11900076 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
12000077
121<a name="l00078"></a><a class="code" href="XMLGrammarPool_8hpp.html#a1">00078</a> <font class="keyword">class </font><a class="code" href="XMLGrammarPool_8hpp.html#a1">Grammar</a>;
12200079 <font class="keyword">class </font><a class="code" href="classXMLGrammarDescription.html">XMLGrammarDescription</a>;
12300080 <font class="keyword">class </font>DTDGrammar;
12400081 <font class="keyword">class </font>SchemaGrammar;
12500082 <font class="keyword">class </font><a class="code" href="classXMLDTDDescription.html">XMLDTDDescription</a>;
12600083 <font class="keyword">class </font><a class="code" href="classXMLSchemaDescription.html">XMLSchemaDescription</a>;
12700084 <font class="keyword">class </font><a class="code" href="XSNamedMap_8hpp.html#a1">XMLStringPool</a>;
12800085 <font class="keyword">class </font><a class="code" href="classBinInputStream.html">BinInputStream</a>;
12900086 <font class="keyword">class </font><a class="code" href="classBinOutputStream.html">BinOutputStream</a>;
13000087
131<a name="l00088"></a><a class="code" href="classXMLGrammarPool.html">00088</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a9"></a> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a> : <font class="keyword">public</font> <a class="code" href="classXMemory.html">XMemory</a>
13200089 {
13300090 <font class="keyword">public</font> :
13400091     <font class="comment">// -----------------------------------------------------------------------</font>
13500093 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------</font>
13600095 <font class="comment"></font>
137<a name="l00100"></a><a class="code" href="classXMLGrammarPool.html#z288_0">00100</a> <font class="comment"></font>    <font class="keyword">virtual</font> ~<a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>(){};
13800102
13900103     <font class="comment">// -----------------------------------------------------------------------</font>
14000105 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------</font>
14100107 <font class="comment"></font>
14200121 <font class="comment"></font>    <font class="keyword">virtual</font> <font class="keywordtype">bool</font>           cacheGrammar(<a class="code" href="XMLGrammarPool_8hpp.html#a1">Grammar</a>* <font class="keyword">const</font>               gramToCache) = 0;
14300122     
14400130     <font class="keyword">virtual</font> <a class="code" href="XMLGrammarPool_8hpp.html#a1">Grammar</a>*       retrieveGrammar(<a class="code" href="classXMLGrammarDescription.html">XMLGrammarDescription</a>* <font class="keyword">const</font> gramDesc) = 0;
14500131     
14600132         
14700141     <font class="keyword">virtual</font> <a class="code" href="XMLGrammarPool_8hpp.html#a1">Grammar</a>*       orphanGrammar(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> nameSpaceKey) = 0; 
14800142
14900143
15000149     <font class="keyword">virtual</font> RefHashTableOfEnumerator&lt;Grammar&gt; getGrammarEnumerator() <font class="keyword">const</font> = 0;
15100150
15200157     <font class="keyword">virtual</font> <font class="keywordtype">bool</font>           clear() = 0;
15300158         
15400168     <font class="keyword">virtual</font> <font class="keywordtype">void</font>           lockPool() = 0;
15500169     
15600180     <font class="keyword">virtual</font> <font class="keywordtype">void</font>           unlockPool() = 0;
15700181
15800183
15900184     <font class="comment">// -----------------------------------------------------------------------</font>
16000186 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------</font>
16100188 <font class="comment"></font>
16200193 <font class="comment"></font>    <font class="keyword">virtual</font> DTDGrammar*            createDTDGrammar() = 0;
16300194
16400199     <font class="keyword">virtual</font> SchemaGrammar*         createSchemaGrammar() = 0;
16500200                     
16600205     <font class="keyword">virtual</font> <a class="code" href="classXMLDTDDescription.html">XMLDTDDescription</a>*     createDTDDescription(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> systemId) = 0;
16700210     <font class="keyword">virtual</font> <a class="code" href="classXMLSchemaDescription.html">XMLSchemaDescription</a>*  createSchemaDescription(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> targetNamespace) = 0;
16800211
16900213
17000214     <font class="comment">// -----------------------------------------------------------------------</font>
17100216 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------                                                        </font>
17200218 <font class="comment"></font>
17300219     <font class="comment">/***</font>
17400220 <font class="comment">      * Return an XSModel derived from the components of all SchemaGrammars</font>
17500221 <font class="comment">      * in the grammar pool.  If the pool is locked, this should</font>
17600222 <font class="comment">      * be a thread-safe operation.  It should return null if and only if</font>
17700223 <font class="comment">      * the pool is empty.</font>
17800224 <font class="comment">      *</font>
17900225 <font class="comment">      * Calling getXSModel() on an unlocked grammar pool may result in the</font>
18000226 <font class="comment">      * creation of a new XSModel with the old XSModel being deleted.  The</font>
18100227 <font class="comment">      * function will return a different address for the XSModel if it has</font>
18200228 <font class="comment">      * changed.</font>
18300229 <font class="comment">      * </font>
18400230 <font class="comment">      * @deprecated (shouldn't use address to determine if XSModel changed)</font>
18500231 <font class="comment">      */</font>
18600232     <font class="keyword">virtual</font> <a class="code" href="classXSModel.html">XSModel</a> *getXSModel() = 0;
18700233
18800234     <font class="comment">/***</font>
18900235 <font class="comment">      * Return an XSModel derived from the components of all SchemaGrammars</font>
19000236 <font class="comment">      * in the grammar pool.  If the pool is locked, this should</font>
19100237 <font class="comment">      * be a thread-safe operation.</font>
19200238 <font class="comment">      *</font>
19300239 <font class="comment">      * NOTE: The function should NEVER return NULL.  If there are no grammars in</font>
19400240 <font class="comment">      *       the pool it should return an XSModel containing the Schema for Schema.      </font>
19500241 <font class="comment">      *</font>
19600242 <font class="comment">      * Calling getXSModel() on an unlocked grammar pool may result in the</font>
19700243 <font class="comment">      * creation of a new XSModel with the old XSModel being deleted.</font>
19800244 <font class="comment">      * The bool parameter will indicate if the XSModel was changed.</font>
19900245 <font class="comment">      *     </font>
20000246 <font class="comment">      * For source code compatibility, default implementation is to say</font>
20100247 <font class="comment">      * XSModelWasChanged.</font>
20200248 <font class="comment">      */</font>
203<a name="l00249"></a><a class="code" href="classXMLGrammarPool.html#z291_1">00249</a>     <font class="keyword">virtual</font> <a class="code" href="classXSModel.html">XSModel</a> *getXSModel(<font class="keywordtype">bool</font>&amp; XSModelWasChanged)
20400250     {
20500251         XSModelWasChanged = <font class="keyword">true</font>;
20600252         <font class="keywordflow">return</font> getXSModel();
20700253     }
20800254     
20900255     <font class="comment">// @}</font>
21000256
21100257     <font class="comment">// -----------------------------------------------------------------------</font>
21200259 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------                                                        </font>
21300261 <font class="comment"></font>
214<a name="l00266"></a><a class="code" href="classXMLGrammarPool.html#z292_0">00266</a> <font class="comment"></font>    <font class="keyword">inline</font> <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    getMemoryManager()
21500267     {
21600268         <font class="keywordflow">return</font> fMemMgr;
21700269     }
21800270
21900277     <font class="keyword">virtual</font> <a class="code" href="XSNamedMap_8hpp.html#a1">XMLStringPool</a> *getURIStringPool() = 0;
22000279
22100280     <font class="comment">// -----------------------------------------------------------------------</font>
22200282 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------                                                        </font>
22300283
22400284     <font class="comment">/***</font>
22500285 <font class="comment">      *</font>
22600286 <font class="comment">      * 1. Context: Serialize/Deserialize All Grammars In One Session</font>
22700287 <font class="comment">      *</font>
22800288 <font class="comment">      *    Since it is common that a declaration in one grammar may reference </font>
22900289 <font class="comment">      *    to definitions in other grammars, it is required to serialize those </font>
23000290 <font class="comment">      *    related (or interdependent) grammars in to one persistent data store </font>
23100291 <font class="comment">      *    in one serialization session (storing), and deserialize them from the</font>
23200292 <font class="comment">      *    persistent data store in one deserialization session (loading) back</font>
23300293 <font class="comment">      *    to the grammar pool.    </font>
23400294 <font class="comment">      *</font>
23500295 <font class="comment">      * 2. Multiple serializations</font>
23600296 <font class="comment">      *</font>
23700297 <font class="comment">      *    It is acceptable that client application requests more than one </font>
23800298 <font class="comment">      *    grammar serialization on a particular grammar pool, to track the </font>
23900299 <font class="comment">      *    different grammars cached, or for whatever reasons that client </font>
24000300 <font class="comment">      *    application is interested in. </font>
24100301 <font class="comment">      *</font>
24200302 <font class="comment">      * 3. Multiple deserializations</font>
24300303 <font class="comment">      * </font>
24400304 <font class="comment">      *    Request for grammar deserialization either after the grammar pool has </font>
24500305 <font class="comment">      *    its own cached grammars, or request for more than one grammar </font>
24600306 <font class="comment">      *    deserialization, may cause undesired and unpredictable consequence</font>
24700307 <font class="comment">      *    and therefore client application shall be aware that individual </font>
24800308 <font class="comment">      *    implementationis may NOT support this.</font>
24900309 <font class="comment">      *</font>
25000310 <font class="comment">      *    However it is strongly recommended that the client application requests </font>
25100311 <font class="comment">      *    no more than one grammar deserialization even a particular implementation</font>
25200312 <font class="comment">      *    may allow multiple deserializations.</font>
25300313 <font class="comment">      *</font>
25400314 <font class="comment">      * 4. Locking</font>
25500315 <font class="comment">      *</font>
25600316 <font class="comment">      *    Both serialization and deserialization requires to lock the grammar pool</font>
25700317 <font class="comment">      *    before operation and unlock after operation. In the case the grammar pool</font>
25800318 <font class="comment">      *    is locked by a third party, the request for serialization/deserialization</font>
25900319 <font class="comment">      *    will NOT be entertained.</font>
26000320 <font class="comment">      *</font>
26100321 <font class="comment">      * 5. Versioning</font>
26200322 <font class="comment">      *</font>
26300323 <font class="comment">      *    The Persistent data store has a version tag to be verified during </font>
26400324 <font class="comment">      *    deserialization, thus a grammar pool may decide if it supports</font>
26500325 <font class="comment">      *    a binary data created by a different release of Xerces.</font>
26600326 <font class="comment">      * </font>
26700327 <font class="comment">      * 6. Clean up</font>
26800328 <font class="comment">      *</font>
26900329 <font class="comment">      *    The client application shall be aware that in the event of an exception</font>
27000330 <font class="comment">      *    thrown due to a corrupted data store during deserialization, implementation</font>
27100331 <font class="comment">      *    may not be able to clean up all resources allocated, and therefore it is </font>
27200332 <font class="comment">      *    client application's responsibility to clean up those unreleased resources.</font>
27300333 <font class="comment">      *</font>
27400334 <font class="comment">      *</font>
27500335 <font class="comment">      */</font>
27600336     <font class="keyword">virtual</font> <font class="keywordtype">void</font>     serializeGrammars(<a class="code" href="classBinOutputStream.html">BinOutputStream</a>* <font class="keyword">const</font>)  = 0;
27700337     <font class="keyword">virtual</font> <font class="keywordtype">void</font>     deserializeGrammars(<a class="code" href="classBinInputStream.html">BinInputStream</a>* <font class="keyword">const</font>) = 0;       
27800338       
27900339 <font class="keyword">protected</font> :
28000340     <font class="comment">// -----------------------------------------------------------------------</font>
28100342 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------</font>
282<a name="l00344"></a><a class="code" href="classXMLGrammarPool.html#z293_0">00344</a> <font class="comment">    XMLGrammarPool(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)</font>
28300345     :fMemMgr(memMgr)
28400346     {
28500347     };
28600349
28700350 <font class="keyword">private</font> :
28800351     <font class="comment">// -----------------------------------------------------------------------</font>
28900353 <font class="comment"></font>    <font class="comment">// -----------------------------------------------------------------------</font>
29000355 <font class="comment">    XMLGrammarPool(const XMLGrammarPool&amp; );</font>
29100356     <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>&amp; operator=(<font class="keyword">const</font> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>&amp; );
29200358
29300359     <font class="comment">// -----------------------------------------------------------------------</font>
29400360     <font class="comment">//</font>
29500361     <font class="comment">// fMemMgr: plugged-in (or defaulted-in) memory manager</font>
29600362     <font class="comment">//          not owned </font>
29700363     <font class="comment">//          no reset after initialization</font>
29800364     <font class="comment">//</font>
29900365     <font class="comment">// -----------------------------------------------------------------------</font>
30000366     
30100367     <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  fMemMgr;
30200368
30300369 };
30400370
30500371 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
30600372
30700373 <font class="preprocessor">#endif</font>
308</pre></div>    </FONT></TD></TR></TABLE><BR>
309</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>
310              Copyright &copy; 1994-2004 The Apache Software Foundation.
311              All Rights Reserved.
312            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.