blob: 52327230f79ca2f94c328048eff0cd2279dce309 [file] [log] [blame]
<HTML><HEAD><TITLE>Xalan-C++ API Documentation</TITLE></HEAD>
<BODY>
<h2 align="center">Xalan-C++ API Documentation</h2>
<h3 align="center">The Xalan C++ XSLT Processor Version 1.10</h3>
</BODY>
<!-- Generated by Doxygen 1.2.8.1 -->
<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>XObjectFactory.hpp</h1><a href="XObjectFactory_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</font>
00003 <font class="comment"> *</font>
00004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
00005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
00006 <font class="comment"> * You may obtain a copy of the License at</font>
00007 <font class="comment"> *</font>
00008 <font class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</font>
00009 <font class="comment"> *</font>
00010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
00011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
00012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
00013 <font class="comment"> * See the License for the specific language governing permissions and</font>
00014 <font class="comment"> * limitations under the License.</font>
00015 <font class="comment"> */</font>
00016 <font class="preprocessor">#if !defined(XOBJECTFACTORY_HEADER_GUARD_1357924680)</font>
<a name="l00017"></a><a class="code" href="XObjectFactory_8hpp.html#a0">00017</a> <font class="preprocessor"></font><font class="preprocessor">#define XOBJECTFACTORY_HEADER_GUARD_1357924680</font>
00018 <font class="preprocessor"></font>
00019
00020
00021 <font class="comment">// Base include file. Must be first.</font>
00022 <font class="preprocessor">#include &lt;<a class="code" href="XPathDefinitions_8hpp.html">xalanc/XPath/XPathDefinitions.hpp</a>&gt;</font>
00023
00024
00025
00026 <font class="preprocessor">#include &lt;algorithm&gt;</font>
00027 <font class="preprocessor">#include &lt;cassert&gt;</font>
00028
00029
00030 <font class="preprocessor">#include &lt;<a class="code" href="XObject_8hpp.html">xalanc/XPath/XObject.hpp</a>&gt;</font>
00031 <font class="preprocessor">#include &lt;<a class="code" href="XPathExecutionContext_8hpp.html">xalanc/XPath/XPathExecutionContext.hpp</a>&gt;</font>
00032
00033
00034
00035 XALAN_CPP_NAMESPACE_BEGIN
00036
00037
00038
<a name="l00039"></a><a class="code" href="XObjectFactory_8hpp.html#a1">00039</a> <font class="keyword">class </font><a class="code" href="classXalanNode.html">XalanNode</a>;
00040 <font class="keyword">class </font><a class="code" href="classMutableNodeRefList.html">MutableNodeRefList</a>;
00041 <font class="keyword">class </font><a class="code" href="classNodeRefListBase.html">NodeRefListBase</a>;
00042 <font class="keyword">class </font><a class="code" href="classXObject.html">XObject</a>;
00043 <font class="keyword">class </font><a class="code" href="classXObjectPtr.html">XObjectPtr</a>;
00044 <font class="keyword">class </font><a class="code" href="classXToken.html">XToken</a>;
00045
00046
00047
<a name="l00051"></a><a class="code" href="classXObjectFactory.html">00051</a> <font class="keyword">class </font>XALAN_XPATH_EXPORT <a class="code" href="classXObjectFactory.html">XObjectFactory</a>
00052 {
00053 <font class="keyword">public</font>:
00054
<a name="l00055"></a><a class="code" href="classXObjectFactory.html#s0">00055</a> <font class="keyword">typedef</font> <a class="code" href="classXPathExecutionContext_1_1BorrowReturnMutableNodeRefList.html">XPathExecutionContext::BorrowReturnMutableNodeRefList</a> <a class="code" href="classXPathExecutionContext_1_1BorrowReturnMutableNodeRefList.html">BorrowReturnMutableNodeRefList</a>;
<a name="l00056"></a><a class="code" href="classXObjectFactory.html#s1">00056</a> <font class="keyword">typedef</font> <a class="code" href="classXPathExecutionContext_1_1GetAndReleaseCachedString.html">XPathExecutionContext::GetAndReleaseCachedString</a> <a class="code" href="classXPathExecutionContext_1_1GetAndReleaseCachedString.html">GetAndReleaseCachedString</a>;
00057
00058
00059 <a class="code" href="classXObjectFactory.html#a0">XObjectFactory</a>(MemoryManagerType&amp; theManager);
00060
00061 <font class="keyword">virtual</font>
00062 <a class="code" href="classXObjectFactory.html#a1">~XObjectFactory</a>();
00063
00064
00065 MemoryManagerType&amp;
<a name="l00066"></a><a class="code" href="classXObjectFactory.html#a2">00066</a> <a class="code" href="classXObjectFactory.html#a2">getMemoryManager</a>()<font class="keyword"></font>
00067 <font class="keyword"> </font>{
00068 <font class="keywordflow">return</font> m_memoryManager;
00069 }
00070
00077 <font class="keywordtype">bool</font>
<a name="l00078"></a><a class="code" href="classXObjectFactory.html#a3">00078</a> <a class="code" href="classXObjectFactory.html#a3">returnObject</a>(<a class="code" href="classXObject.html">XObject</a>* theXObject)<font class="keyword"></font>
00079 <font class="keyword"> </font>{
00080 <font class="keywordflow">return</font> <a class="code" href="classXObjectFactory.html#b2">doReturnObject</a>(theXObject);
00081 }
00082
00087 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00088 <a class="code" href="classXObjectFactory.html#a4">reset</a>() = 0;
00089
00096 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00097 <a class="code" href="classXObjectFactory.html#a5">createBoolean</a>(<font class="keywordtype">bool</font> theValue) = 0;
00098
00105 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00106 <a class="code" href="classXObjectFactory.html#a6">createNodeSet</a>(<a class="code" href="classXPathExecutionContext_1_1BorrowReturnMutableNodeRefList.html">BorrowReturnMutableNodeRefList</a>&amp; theValue) = 0;
00107
00114 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00115 <a class="code" href="classXObjectFactory.html#a6">createNodeSet</a>(<a class="code" href="classXalanNode.html">XalanNode</a>* theValue) = 0;
00116
00123 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00124 <a class="code" href="classXObjectFactory.html#a8">createNull</a>() = 0;
00125
00132 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00133 <a class="code" href="classXObjectFactory.html#a9">createNumber</a>(<font class="keywordtype">double</font> theValue) = 0;
00134
00143 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00144 <a class="code" href="classXObjectFactory.html#a9">createNumber</a>(<font class="keyword">const</font> <a class="code" href="classXToken.html">XToken</a>&amp; theValue) = 0;
00145
00152 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00153 <a class="code" href="classXObjectFactory.html#a11">createString</a>(<font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theValue) = 0;
00154
00161 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00162 <a class="code" href="classXObjectFactory.html#a11">createString</a>(<font class="keyword">const</font> XalanDOMChar* theValue) = 0;
00163
00171 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00172 <a class="code" href="classXObjectFactory.html#a11">createString</a>(
00173 <font class="keyword">const</font> XalanDOMChar* theValue,
00174 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> theLength) = 0;
00175
00184 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00185 <a class="code" href="classXObjectFactory.html#a11">createString</a>(<font class="keyword">const</font> <a class="code" href="classXToken.html">XToken</a>&amp; theValue) = 0;
00186
00196 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00197 <a class="code" href="classXObjectFactory.html#a15">createStringReference</a>(<font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theValue) = 0;
00198
00207 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00208 <a class="code" href="classXObjectFactory.html#a16">createStringAdapter</a>(<font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>&amp; theValue) = 0;
00209
00216 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00217 <a class="code" href="classXObjectFactory.html#a11">createString</a>(<a class="code" href="classXPathExecutionContext_1_1GetAndReleaseCachedString.html">GetAndReleaseCachedString</a>&amp; theValue) = 0;
00218
00225 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classXObjectPtr.html">XObjectPtr</a>
00226 <a class="code" href="classXObjectFactory.html#a18">createUnknown</a>(<font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theValue) = 0;
00227
00233 <font class="preprocessor">#if defined(XALAN_NO_STD_NAMESPACE)</font>
00234 <font class="preprocessor"></font> <font class="keyword">struct </font>DeleteXObjectFunctor : <font class="keyword">public</font> unary_function&lt;XObject*, void&gt;
00235 #else
<a name="l00236"></a><a class="code" href="structXObjectFactory_1_1DeleteXObjectFunctor.html">00236</a> struct DeleteXObjectFunctor : <font class="keyword">public</font> std::unary_function&lt;XObject*, void&gt;
00237 #endif
00238 {
00239 <font class="keyword">public</font>:
00240
<a name="l00241"></a><a class="code" href="structXObjectFactory_1_1DeleteXObjectFunctor.html#a0">00241</a> <a class="code" href="structXObjectFactory_1_1DeleteXObjectFunctor.html#a0">DeleteXObjectFunctor</a>(
00242 <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp; theFactoryInstance,
00243 <font class="keywordtype">bool</font> fInReset = <font class="keyword">false</font>) :
00244 m_factoryInstance(theFactoryInstance),
00245 m_fInReset(fInReset)
00246 {
00247 }
00248
00249 result_type
<a name="l00250"></a><a class="code" href="structXObjectFactory_1_1DeleteXObjectFunctor.html#a1">00250</a> <a class="code" href="structXObjectFactory_1_1DeleteXObjectFunctor.html#a1">operator()</a>(argument_type theXObject)<font class="keyword"> const</font>
00251 <font class="keyword"> </font>{
00252 <font class="keywordflow">if</font> (m_fInReset == <font class="keyword">true</font>)
00253 {
00254 m_factoryInstance.<a class="code" href="classXObjectFactory.html#b2">doReturnObject</a>(
00255 theXObject,
00256 <font class="keyword">true</font>);
00257 }
00258 <font class="keywordflow">else</font>
00259 {
00260 m_factoryInstance.<a class="code" href="classXObjectFactory.html#a3">returnObject</a>(theXObject);
00261 }
00262 }
00263
00264 <font class="keyword">private</font>:
00265
00266 <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp; m_factoryInstance;
00267
00268 <font class="keyword">const</font> <font class="keywordtype">bool</font> m_fInReset;
00269 };
00270
<a name="l00271"></a><a class="code" href="classXObjectFactory.html#l0">00271</a> <font class="keyword">friend</font> <font class="keyword">struct </font>DeleteXObjectFunctor;
00272
00273 <font class="keyword">protected</font>:
00274
00280 XObject::eObjectType
<a name="l00281"></a><a class="code" href="classXObjectFactory.html#b0">00281</a> <a class="code" href="classXObjectFactory.html#b0">getRealType</a>(<font class="keyword">const</font> <a class="code" href="classXObject.html">XObject</a>&amp; theXObject)<font class="keyword"> const</font>
00282 <font class="keyword"> </font>{
00283 <font class="keywordflow">return</font> theXObject.<a class="code" href="classXObject.html#b0">getRealType</a>();
00284 }
00285
00291 <font class="keywordtype">void</font>
<a name="l00292"></a><a class="code" href="classXObjectFactory.html#b1">00292</a> <a class="code" href="classXObjectFactory.html#b1">deleteObject</a>(<font class="keyword">const</font> <a class="code" href="classXObject.html">XObject</a>* theXObject)<font class="keyword"> const</font>
00293 <font class="keyword"> </font>{
00294 <font class="keywordflow">if</font>( theXObject!= 0)
00295 {
00296 <a class="code" href="classXObject.html">XObject</a>* theTmpXObject = const_cast&lt;XObject*&gt;(theXObject);
00297 MemoryManagerType&amp; theManager = const_cast&lt;MemoryManagerType&amp;&gt;(m_memoryManager);
00298
00299 theTmpXObject-&gt;<a class="code" href="classXObject.html#b3">~XObject</a>();
00300
00301 theManager.deallocate((<font class="keywordtype">void</font>*)theTmpXObject);
00302 }
00303
00304 }
00305
00312
00313 <font class="keyword">virtual</font> <font class="keywordtype">bool</font>
00314 <a class="code" href="classXObjectFactory.html#b2">doReturnObject</a>(
00315 <a class="code" href="classXObject.html">XObject</a>* theXObject,
00316 <font class="keywordtype">bool</font> fInReset = <font class="keyword">false</font>) = 0;
00317
00318 <font class="keyword">private</font>:
00319
00320 <font class="comment">// Not implemented...</font>
00321 <a class="code" href="classXObjectFactory.html#a0">XObjectFactory</a>(<font class="keyword">const</font> <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp;);
00322
00323 <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp;
00324 operator=(<font class="keyword">const</font> <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp;);
00325
00326 <font class="keywordtype">bool</font>
00327 <a class="code" href="ElemAttributeSet_8hpp.html#a1">operator==</a>(<font class="keyword">const</font> <a class="code" href="classXObjectFactory.html">XObjectFactory</a>&amp;) <font class="keyword">const</font>;
00328
00329 MemoryManagerType&amp; m_memoryManager;
00330 };
00331
00332
00333
00334 XALAN_CPP_NAMESPACE_END
00335
00336
00337
00338 <font class="preprocessor">#endif // XOBJECTFACTORY_HEADER_GUARD_1357924680</font>
</font></pre></div><p align="center"><a href="diagramnotes.html">Interpreting class diagrams</a></p>
<p><FONT color="#000000" face="arial,helvetica,sanserif" size="-1">
<i><A href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</A> and
<A href="http://www.research.att.com/sw/tools/graphviz/">GraphViz</A> are used to generate this API documentation from the Xalan-C header files.</I></FONT></p>
<TABLE border="0" cellpadding="0" cellspacing="0" width="820"><TR><TD bgcolor="#0086b2"><IMG height="1" src="../resources/dot.gif" width="1" alt="dot"></TD></TR></TABLE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="80%">
<TR>
<TD WIDTH="80%" VALIGN="TOP">
<P ALIGN="CENTER"><B>Xalan-C++ XSLT Processor Version 1.10</B><BR>
Copyright &copy; 1999-2004 The Apache Software Foundation. All Rights Reserved.</i></p>
</TD>
</TR>
<TR>
<TD WIDTH="100%">
<P ALIGN="CENTER"><IMG SRC="ApacheLogo.jpg" WIDTH="387" HEIGHT="100" ALIGN="BOTTOM" BORDER="0" ALT="Apache Logo">
</TD>
</TR>
</TABLE>