You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>Xerces-C++: XMLGrammarPool.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Xerces-C++  <span id="projectnumber">3.1.2</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_901b4356d5f32ee418b4c714d07fb65a.html">src</a></li><li class="navelem"><a class="el" href="dir_477226ead712f319998d821c029f7620.html">xercesc</a></li><li class="navelem"><a class="el" href="dir_41aef2f7a87f1ae87976cc1bb7e908ff.html">framework</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">XMLGrammarPool.hpp</div> </div> </div><!--header--> <div class="contents"> <a href="XMLGrammarPool_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * this work for additional information regarding copyright ownership.</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * (the "License"); you may not use this file except in compliance with</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * the License. You may obtain a copy of the License at</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * </span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * </span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * limitations under the License.</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> */</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">/*</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * $Id: XMLGrammarPool.hpp 527149 2007-04-10 14:56:39Z amassari $</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> */</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#if !defined(XERCESC_INCLUDE_GUARD_XMLGRAMMARPOOL_HPP)</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#define XERCESC_INCLUDE_GUARD_XMLGRAMMARPOOL_HPP</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <xercesc/util/RefHashTableOf.hpp></span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="XSModel_8hpp.html">xercesc/framework/psvi/XSModel.hpp</a>></span></div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <a class="code" href="XercesDefs_8hpp.html#a43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a></div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">class </span>Grammar;</div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">class </span><a class="code" href="classXMLGrammarDescription.html">XMLGrammarDescription</a>;</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">class </span>DTDGrammar;</div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">class </span>SchemaGrammar;</div> <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">class </span><a class="code" href="classXMLDTDDescription.html">XMLDTDDescription</a>;</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">class </span><a class="code" href="classXMLSchemaDescription.html">XMLSchemaDescription</a>;</div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">class </span>XMLStringPool;</div> <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">class </span><a class="code" href="classBinInputStream.html">BinInputStream</a>;</div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">class </span><a class="code" href="classBinOutputStream.html">BinOutputStream</a>;</div> <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html"> 43</a></span> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a13df5a01e63e51f62a1467b588b59054">XMLPARSER_EXPORT</a> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a> : <span class="keyword">public</span> <a class="code" href="classXMemory.html">XMemory</a></div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> {</div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">public</span> :</div> <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"></span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"></span></div> <div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html#a792b7f4329e5f5879e697267e1f77045"> 55</a></span>  <span class="keyword">virtual</span> <a class="code" href="classXMLGrammarPool.html#a792b7f4329e5f5879e697267e1f77045">~XMLGrammarPool</a>(){};</div> <div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div> <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment"></span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment"></span></div> <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> cacheGrammar(Grammar* <span class="keyword">const</span> gramToCache) = 0;</div> <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div> <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keyword">virtual</span> Grammar* retrieveGrammar(<a class="code" href="classXMLGrammarDescription.html">XMLGrammarDescription</a>* <span class="keyword">const</span> gramDesc) = 0;</div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  </div> <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  </div> <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keyword">virtual</span> Grammar* orphanGrammar(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> nameSpaceKey) = 0; </div> <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> <div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div> <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">virtual</span> RefHashTableOfEnumerator<Grammar> getGrammarEnumerator() <span class="keyword">const</span> = 0;</div> <div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div> <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> clear() = 0;</div> <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div> <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> lockPool() = 0;</div> <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div> <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> unlockPool() = 0;</div> <div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div> <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment"></span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"></span></div> <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keyword">virtual</span> DTDGrammar* createDTDGrammar() = 0;</div> <div class="line"><a name="l00149"></a><span class="lineno"> 149</span> </div> <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keyword">virtual</span> SchemaGrammar* createSchemaGrammar() = 0;</div> <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  </div> <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keyword">virtual</span> <a class="code" href="classXMLDTDDescription.html">XMLDTDDescription</a>* createDTDDescription(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> systemId) = 0;</div> <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keyword">virtual</span> <a class="code" href="classXMLSchemaDescription.html">XMLSchemaDescription</a>* createSchemaDescription(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> targetNamespace) = 0;</div> <div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div> <div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div> <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="comment"></span> <span class="comment">// ----------------------------------------------------------------------- </span></div> <div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="comment"></span></div> <div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="comment">/***</span></div> <div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="comment"> * Return an XSModel derived from the components of all SchemaGrammars</span></div> <div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="comment"> * in the grammar pool. If the pool is locked, this should</span></div> <div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="comment"> * be a thread-safe operation.</span></div> <div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="comment"> *</span></div> <div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="comment"> * NOTE: The function should NEVER return NULL. If there are no grammars in</span></div> <div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="comment"> * the pool it should return an XSModel containing the Schema for Schema. </span></div> <div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment"> *</span></div> <div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="comment"> * Calling getXSModel() on an unlocked grammar pool may result in the</span></div> <div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment"> * creation of a new XSModel with the old XSModel being deleted.</span></div> <div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="comment"> * The bool parameter will indicate if the XSModel was changed.</span></div> <div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="comment"> * </span></div> <div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="comment"> */</span></div> <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keyword">virtual</span> <a class="code" href="classXSModel.html">XSModel</a> *getXSModel(<span class="keywordtype">bool</span>& XSModelWasChanged) = 0;</div> <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div> <div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// @}</span></div> <div class="line"><a name="l00190"></a><span class="lineno"> 190</span> </div> <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="comment"></span> <span class="comment">// ----------------------------------------------------------------------- </span></div> <div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="comment"></span></div> <div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html#ae12c5153eb902652d3ebd5c8d504e5b3"> 200</a></span>  <span class="keyword">inline</span> <a class="code" href="classMemoryManager.html">MemoryManager</a>* <a class="code" href="classXMLGrammarPool.html#ae12c5153eb902652d3ebd5c8d504e5b3">getMemoryManager</a>()</div> <div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  {</div> <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">return</span> fMemMgr;</div> <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  }</div> <div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div> <div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keyword">virtual</span> XMLStringPool *getURIStringPool() = 0;</div> <div class="line"><a name="l00213"></a><span class="lineno"> 213</span> </div> <div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="comment"></span> <span class="comment">// ----------------------------------------------------------------------- </span></div> <div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div> <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="comment">/***</span></div> <div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="comment"> *</span></div> <div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <span class="comment"> * 1. Context: Serialize/Deserialize All Grammars In One Session</span></div> <div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="comment"> *</span></div> <div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="comment"> * Since it is common that a declaration in one grammar may reference </span></div> <div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="comment"> * to definitions in other grammars, it is required to serialize those </span></div> <div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="comment"> * related (or interdependent) grammars in to one persistent data store </span></div> <div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="comment"> * in one serialization session (storing), and deserialize them from the</span></div> <div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="comment"> * persistent data store in one deserialization session (loading) back</span></div> <div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment"> * to the grammar pool. </span></div> <div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="comment"> *</span></div> <div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="comment"> * 2. Multiple serializations</span></div> <div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="comment"> *</span></div> <div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="comment"> * It is acceptable that client application requests more than one </span></div> <div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="comment"> * grammar serialization on a particular grammar pool, to track the </span></div> <div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="comment"> * different grammars cached, or for whatever reasons that client </span></div> <div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> * application is interested in. </span></div> <div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="comment"> *</span></div> <div class="line"><a name="l00236"></a><span class="lineno"> 236</span> <span class="comment"> * 3. Multiple deserializations</span></div> <div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="comment"> * </span></div> <div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="comment"> * Request for grammar deserialization either after the grammar pool has </span></div> <div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="comment"> * its own cached grammars, or request for more than one grammar </span></div> <div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="comment"> * deserialization, may cause undesired and unpredictable consequence</span></div> <div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="comment"> * and therefore client application shall be aware that individual </span></div> <div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="comment"> * implementationis may NOT support this.</span></div> <div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="comment"> *</span></div> <div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="comment"> * However it is strongly recommended that the client application requests </span></div> <div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="comment"> * no more than one grammar deserialization even a particular implementation</span></div> <div class="line"><a name="l00246"></a><span class="lineno"> 246</span> <span class="comment"> * may allow multiple deserializations.</span></div> <div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="comment"> *</span></div> <div class="line"><a name="l00248"></a><span class="lineno"> 248</span> <span class="comment"> * 4. Locking</span></div> <div class="line"><a name="l00249"></a><span class="lineno"> 249</span> <span class="comment"> *</span></div> <div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="comment"> * Both serialization and deserialization requires to lock the grammar pool</span></div> <div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="comment"> * before operation and unlock after operation. In the case the grammar pool</span></div> <div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="comment"> * is locked by a third party, the request for serialization/deserialization</span></div> <div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="comment"> * will NOT be entertained.</span></div> <div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="comment"> *</span></div> <div class="line"><a name="l00255"></a><span class="lineno"> 255</span> <span class="comment"> * 5. Versioning</span></div> <div class="line"><a name="l00256"></a><span class="lineno"> 256</span> <span class="comment"> *</span></div> <div class="line"><a name="l00257"></a><span class="lineno"> 257</span> <span class="comment"> * The Persistent data store has a version tag to be verified during </span></div> <div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="comment"> * deserialization, thus a grammar pool may decide if it supports</span></div> <div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment"> * a binary data created by a different release of Xerces.</span></div> <div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="comment"> * </span></div> <div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> * 6. Clean up</span></div> <div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="comment"> *</span></div> <div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="comment"> * The client application shall be aware that in the event of an exception</span></div> <div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <span class="comment"> * thrown due to a corrupted data store during deserialization, implementation</span></div> <div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="comment"> * may not be able to clean up all resources allocated, and therefore it is </span></div> <div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="comment"> * client application's responsibility to clean up those unreleased resources.</span></div> <div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="comment"> *</span></div> <div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="comment"> *</span></div> <div class="line"><a name="l00269"></a><span class="lineno"> 269</span> <span class="comment"> */</span></div> <div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> serializeGrammars(<a class="code" href="classBinOutputStream.html">BinOutputStream</a>* <span class="keyword">const</span>) = 0; </div> <div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> deserializeGrammars(<a class="code" href="classBinInputStream.html">BinInputStream</a>* <span class="keyword">const</span>) = 0; </div> <div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  </div> <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="comment">/*</span></div> <div class="line"><a name="l00274"></a><span class="lineno"> 274</span> <span class="comment"> * Set/get a flag to not create XSAnnotations when deserializing the grammar.</span></div> <div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="comment"> * Defaults to false (create XSAnnotations when deserializing the grammar).</span></div> <div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="comment"> */</span></div> <div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html#af320d13b44ba404c9653e5934ddd782a"> 277</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classXMLGrammarPool.html#af320d13b44ba404c9653e5934ddd782a">setIgnoreSerializedAnnotations</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> flag)</div> <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  {</div> <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  fIgnoreSerializedAnnotations = flag;</div> <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  };</div> <div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html#a9b8187ba62782cc03c0ad1fc6a658023"> 281</a></span>  <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLGrammarPool.html#a9b8187ba62782cc03c0ad1fc6a658023">getIgnoreSerializedAnnotations</a>()<span class="keyword"> const</span></div> <div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="keyword"> </span>{</div> <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordflow">return</span> fIgnoreSerializedAnnotations;</div> <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  };</div> <div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div> <div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="keyword">protected</span> :</div> <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00289"></a><span class="lineno"> 289</span> <span class="comment"></span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classXMLGrammarPool.html#a0dc250a1820cebb8aa99449d1c57e502"> 291</a></span> <span class="comment"></span> <a class="code" href="classXMLGrammarPool.html#a0dc250a1820cebb8aa99449d1c57e502">XMLGrammarPool</a>(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = <a class="code" href="classXMLPlatformUtils.html#a97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a>)</div> <div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  :fMemMgr(memMgr)</div> <div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  ,fIgnoreSerializedAnnotations(false)</div> <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  {</div> <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  };</div> <div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div> <div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="keyword">private</span> :</div> <div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="comment"></span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="comment"></span> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>(<span class="keyword">const</span> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>& );</div> <div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>& operator=(<span class="keyword">const</span> <a class="code" href="classXMLGrammarPool.html">XMLGrammarPool</a>& );</div> <div class="line"><a name="l00306"></a><span class="lineno"> 306</span> </div> <div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="comment">//</span></div> <div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="comment">// fMemMgr: plugged-in (or defaulted-in) memory manager</span></div> <div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="comment">// not owned </span></div> <div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="comment">// no reset after initialization</span></div> <div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="comment">//</span></div> <div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  </div> <div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> fMemMgr;</div> <div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordtype">bool</span> fIgnoreSerializedAnnotations;</div> <div class="line"><a name="l00317"></a><span class="lineno"> 317</span> </div> <div class="line"><a name="l00318"></a><span class="lineno"> 318</span> };</div> <div class="line"><a name="l00319"></a><span class="lineno"> 319</span> </div> <div class="line"><a name="l00320"></a><span class="lineno"> 320</span> <a class="code" href="XercesDefs_8hpp.html#af03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a></div> <div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div> <div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="preprocessor">#endif</span></div> <div class="ttc" id="classBinOutputStream_html"><div class="ttname"><a href="classBinOutputStream.html">BinOutputStream</a></div><div class="ttdef"><b>Definition:</b> BinOutputStream.hpp:29</div></div> <div class="ttc" id="classXMemory_html"><div class="ttname"><a href="classXMemory.html">XMemory</a></div><div class="ttdoc">This class makes it possible to override the C++ memory management by adding new/delete operators to ...</div><div class="ttdef"><b>Definition:</b> XMemory.hpp:40</div></div> <div class="ttc" id="classXMLPlatformUtils_html_a97eff0d9fff3567bea3acd3ca4d95252"><div class="ttname"><a href="classXMLPlatformUtils.html#a97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a></div><div class="ttdeci">static MemoryManager * fgMemoryManager</div><div class="ttdoc">The configurable memory manager. </div><div class="ttdef"><b>Definition:</b> PlatformUtils.hpp:121</div></div> <div class="ttc" id="classXMLGrammarPool_html_a9b8187ba62782cc03c0ad1fc6a658023"><div class="ttname"><a href="classXMLGrammarPool.html#a9b8187ba62782cc03c0ad1fc6a658023">XMLGrammarPool::getIgnoreSerializedAnnotations</a></div><div class="ttdeci">bool getIgnoreSerializedAnnotations() const </div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:281</div></div> <div class="ttc" id="classXMLGrammarPool_html"><div class="ttname"><a href="classXMLGrammarPool.html">XMLGrammarPool</a></div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:43</div></div> <div class="ttc" id="XSModel_8hpp_html"><div class="ttname"><a href="XSModel_8hpp.html">XSModel.hpp</a></div></div> <div class="ttc" id="classXMLGrammarPool_html_a792b7f4329e5f5879e697267e1f77045"><div class="ttname"><a href="classXMLGrammarPool.html#a792b7f4329e5f5879e697267e1f77045">XMLGrammarPool::~XMLGrammarPool</a></div><div class="ttdeci">virtual ~XMLGrammarPool()</div><div class="ttdoc">virtual destructor </div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:55</div></div> <div class="ttc" id="classXMLGrammarPool_html_a0dc250a1820cebb8aa99449d1c57e502"><div class="ttname"><a href="classXMLGrammarPool.html#a0dc250a1820cebb8aa99449d1c57e502">XMLGrammarPool::XMLGrammarPool</a></div><div class="ttdeci">XMLGrammarPool(MemoryManager *const memMgr=XMLPlatformUtils::fgMemoryManager)</div><div class="ttdoc">Hidden Constructors. </div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:291</div></div> <div class="ttc" id="XercesDefs_8hpp_html_a13df5a01e63e51f62a1467b588b59054"><div class="ttname"><a href="XercesDefs_8hpp.html#a13df5a01e63e51f62a1467b588b59054">XMLPARSER_EXPORT</a></div><div class="ttdeci">#define XMLPARSER_EXPORT</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:163</div></div> <div class="ttc" id="classXSModel_html"><div class="ttname"><a href="classXSModel.html">XSModel</a></div><div class="ttdef"><b>Definition:</b> XSModel.hpp:59</div></div> <div class="ttc" id="PlatformUtils_8hpp_html"><div class="ttname"><a href="PlatformUtils_8hpp.html">PlatformUtils.hpp</a></div></div> <div class="ttc" id="classMemoryManager_html"><div class="ttname"><a href="classMemoryManager.html">MemoryManager</a></div><div class="ttdoc">Configurable memory manager. </div><div class="ttdef"><b>Definition:</b> MemoryManager.hpp:39</div></div> <div class="ttc" id="XercesDefs_8hpp_html_a43d74fa53d868d978f3e97cbb78b194d"><div class="ttname"><a href="XercesDefs_8hpp.html#a43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a></div><div class="ttdeci">#define XERCES_CPP_NAMESPACE_BEGIN</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:112</div></div> <div class="ttc" id="Xerces__autoconf__config_8borland_8hpp_html_a8cb107980a360c490ad7661f5d27cc0e"><div class="ttname"><a href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a></div><div class="ttdeci">wchar_t XMLCh</div><div class="ttdef"><b>Definition:</b> Xerces_autoconf_config.borland.hpp:92</div></div> <div class="ttc" id="XercesDefs_8hpp_html_af03d5cb905763ef7a7bd22ab82718285"><div class="ttname"><a href="XercesDefs_8hpp.html#af03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a></div><div class="ttdeci">#define XERCES_CPP_NAMESPACE_END</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:113</div></div> <div class="ttc" id="classXMLDTDDescription_html"><div class="ttname"><a href="classXMLDTDDescription.html">XMLDTDDescription</a></div><div class="ttdef"><b>Definition:</b> XMLDTDDescription.hpp:29</div></div> <div class="ttc" id="classXMLGrammarPool_html_ae12c5153eb902652d3ebd5c8d504e5b3"><div class="ttname"><a href="classXMLGrammarPool.html#ae12c5153eb902652d3ebd5c8d504e5b3">XMLGrammarPool::getMemoryManager</a></div><div class="ttdeci">MemoryManager * getMemoryManager()</div><div class="ttdoc">getMemoryManager </div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:200</div></div> <div class="ttc" id="classBinInputStream_html"><div class="ttname"><a href="classBinInputStream.html">BinInputStream</a></div><div class="ttdef"><b>Definition:</b> BinInputStream.hpp:29</div></div> <div class="ttc" id="classXMLGrammarDescription_html"><div class="ttname"><a href="classXMLGrammarDescription.html">XMLGrammarDescription</a></div><div class="ttdef"><b>Definition:</b> XMLGrammarDescription.hpp:32</div></div> <div class="ttc" id="XMemory_8hpp_html"><div class="ttname"><a href="XMemory_8hpp.html">XMemory.hpp</a></div></div> <div class="ttc" id="classXMLSchemaDescription_html"><div class="ttname"><a href="classXMLSchemaDescription.html">XMLSchemaDescription</a></div><div class="ttdef"><b>Definition:</b> XMLSchemaDescription.hpp:32</div></div> <div class="ttc" id="classXMLGrammarPool_html_af320d13b44ba404c9653e5934ddd782a"><div class="ttname"><a href="classXMLGrammarPool.html#af320d13b44ba404c9653e5934ddd782a">XMLGrammarPool::setIgnoreSerializedAnnotations</a></div><div class="ttdeci">void setIgnoreSerializedAnnotations(const bool flag)</div><div class="ttdef"><b>Definition:</b> XMLGrammarPool.hpp:277</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Wed Mar 18 2015 10:43:37 for Xerces-C++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
|