Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 5e43f5d92fadaa0a1cc4664249b615d0 > files > 44

xalan-c-doc-1.1-8mdk.i586.rpm

<HTML><HEAD><TITLE>Xalan-C++ API Documentation</TITLE></HEAD>
<BODY>
<h2 align="center">Xalan-C++ API Documentation</h2>
<h3 align="center">The Xalan C++ XSL Transformer Version 1.1</h3>
</BODY>
<!-- Generated by Doxygen 1.2.0 on Thu Feb 15 10:43:50 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>DOMHelper.hpp</h1><a href="DOMHelper.hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*
</font>00002 <font class="comment"> * The Apache Software License, Version 1.1
</font>00003 <font class="comment"> *
</font>00004 <font class="comment"> *
</font>00005 <font class="comment"> * Copyright (c) 1999 The Apache Software Foundation.  All rights 
</font>00006 <font class="comment"> * reserved.
</font>00007 <font class="comment"> *
</font>00008 <font class="comment"> * Redistribution and use in source and binary forms, with or without
</font>00009 <font class="comment"> * modification, are permitted provided that the following conditions
</font>00010 <font class="comment"> * are met:
</font>00011 <font class="comment"> *
</font>00012 <font class="comment"> * 1. Redistributions of source code must retain the above copyright
</font>00013 <font class="comment"> *    notice, this list of conditions and the following disclaimer. 
</font>00014 <font class="comment"> *
</font>00015 <font class="comment"> * 2. Redistributions in binary form must reproduce the above copyright
</font>00016 <font class="comment"> *    notice, this list of conditions and the following disclaimer in
</font>00017 <font class="comment"> *    the documentation and/or other materials provided with the
</font>00018 <font class="comment"> *    distribution.
</font>00019 <font class="comment"> *
</font>00020 <font class="comment"> * 3. The end-user documentation included with the redistribution,
</font>00021 <font class="comment"> *    if any, must include the following acknowledgment:  
</font>00022 <font class="comment"> *       "This product includes software developed by the
</font>00023 <font class="comment"> *        Apache Software Foundation (http://www.apache.org/)."
</font>00024 <font class="comment"> *    Alternately, this acknowledgment may appear in the software itself,
</font>00025 <font class="comment"> *    if and wherever such third-party acknowledgments normally appear.
</font>00026 <font class="comment"> *
</font>00027 <font class="comment"> * 4. The names "Xalan" and "Apache Software Foundation" must
</font>00028 <font class="comment"> *    not be used to endorse or promote products derived from this
</font>00029 <font class="comment"> *    software without prior written permission. For written 
</font>00030 <font class="comment"> *    permission, please contact apache@apache.org.
</font>00031 <font class="comment"> *
</font>00032 <font class="comment"> * 5. Products derived from this software may not be called "Apache",
</font>00033 <font class="comment"> *    nor may "Apache" appear in their name, without prior written
</font>00034 <font class="comment"> *    permission of the Apache Software Foundation.
</font>00035 <font class="comment"> *
</font>00036 <font class="comment"> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
</font>00037 <font class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</font>00038 <font class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
</font>00039 <font class="comment"> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
</font>00040 <font class="comment"> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
</font>00041 <font class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
</font>00042 <font class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
</font>00043 <font class="comment"> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
</font>00044 <font class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
</font>00045 <font class="comment"> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
</font>00046 <font class="comment"> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
</font>00047 <font class="comment"> * SUCH DAMAGE.
</font>00048 <font class="comment"> * ====================================================================
</font>00049 <font class="comment"> *
</font>00050 <font class="comment"> * This software consists of voluntary contributions made by many
</font>00051 <font class="comment"> * individuals on behalf of the Apache Software Foundation and was
</font>00052 <font class="comment"> * originally based on software copyright (c) 1999, International
</font>00053 <font class="comment"> * Business Machines, Inc., http://www.ibm.com.  For more
</font>00054 <font class="comment"> * information on the Apache Software Foundation, please see
</font>00055 <font class="comment"> * &lt;http://www.apache.org/&gt;.
</font>00056 <font class="comment"> */</font>
00057 <font class="preprocessor">#if !defined(DOMHELPER_HEADER_GUARD_1357924680)
</font><a name="l00058"></a><a class="code" href="DOMHelper.hpp.html#a0">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define DOMHELPER_HEADER_GUARD_1357924680
</font>00059 <font class="preprocessor"></font>
00060 
00061 <font class="preprocessor">#error This file is obsolete!!!!
</font>00062 <font class="preprocessor"></font>
00063 
00064 <font class="comment">// STL header file for class unary_function.</font>
00065 <font class="preprocessor">#include &lt;functional&gt;</font>
00066 
00067 
00068 
00069 <font class="preprocessor">#include &lt;dom/DOM_Node.hpp&gt;</font>
00070 <font class="preprocessor">#include &lt;dom/DOM_NodeList.hpp&gt;</font>
00071 <font class="preprocessor">#include &lt;dom/DOM_NamedNodeMap.hpp&gt;</font>
00072 <font class="preprocessor">#include &lt;dom/DOM_Element.hpp&gt;</font>
00073 
00074 
00075 
00076 <font class="keyword">class </font>DOM_NullPtr;
00077 <font class="keyword">class </font>NodeImpl;
00078 
00079 
00080 
00089 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00090"></a><a class="code" href="DOMHelper.hpp.html#a1">00090</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00091             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>,
00092             <font class="keyword">const</font> <a class="code" href="class_dom_node.html">DOM_Node</a>&amp;     theObject)<font class="keyword">
</font>00093 <font class="keyword"></font>{
00094     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00095 }
00096 
00097 
00098 
00107 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00108"></a><a class="code" href="DOMHelper.hpp.html#a2">00108</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00109             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>,
00110             <font class="keyword">const</font> DOM_NamedNodeMap&amp;     theObject)<font class="keyword">
</font>00111 <font class="keyword"></font>{
00112     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00113 }
00114 
00115 
00124 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00125"></a><a class="code" href="DOMHelper.hpp.html#a3">00125</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00126             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>,
00127             <font class="keyword">const</font> DOM_NodeList&amp;     theObject)<font class="keyword">
</font>00128 <font class="keyword"></font>{
00129     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00130 }
00131 
00132 
00133 
00142 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00143"></a><a class="code" href="DOMHelper.hpp.html#a4">00143</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00144             <font class="keyword">const</font> <a class="code" href="class_dom_node.html">DOM_Node</a>&amp;     theObject,
00145             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00146 <font class="keyword"></font>{
00147     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00148 }
00149 
00150 
00151 
00160 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00161"></a><a class="code" href="DOMHelper.hpp.html#a5">00161</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00162             <font class="keyword">const</font> DOM_NamedNodeMap&amp;     theObject,
00163             <font class="keywordtype">int</font>                         <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00164 <font class="keyword"></font>{
00165     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00166 }
00167 
00168 
00169 
00178 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00179"></a><a class="code" href="DOMHelper.hpp.html#a6">00179</a> <a class="code" href="XalanDOMString.hpp.html#a4">operator==</a>(
00180             <font class="keyword">const</font> DOM_NodeList&amp;     theObject,
00181             <font class="keywordtype">int</font>                     <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00182 <font class="keyword"></font>{
00183     <font class="keywordflow">return</font> theObject == <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00184 }
00185 
00186 
00187 
00196 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00197"></a><a class="code" href="DOMHelper.hpp.html#a7">00197</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00198             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>,
00199             <font class="keyword">const</font> <a class="code" href="class_dom_node.html">DOM_Node</a>&amp;     theObject)<font class="keyword">
</font>00200 <font class="keyword"></font>{
00201     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00202 }
00203 
00204 
00205 
00214 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00215"></a><a class="code" href="DOMHelper.hpp.html#a8">00215</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00216             <font class="keywordtype">int</font>                         <font class="comment">/* theAddress */</font>,
00217             <font class="keyword">const</font> DOM_NamedNodeMap&amp;     theObject)<font class="keyword">
</font>00218 <font class="keyword"></font>{
00219     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00220 }
00221 
00222 
00223 
00232 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00233"></a><a class="code" href="DOMHelper.hpp.html#a9">00233</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00234             <font class="keywordtype">int</font>                     <font class="comment">/* theAddress */</font>,
00235             <font class="keyword">const</font> DOM_NodeList&amp;     theObject)<font class="keyword">
</font>00236 <font class="keyword"></font>{
00237     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00238 }
00239 
00240 
00241 
00250 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00251"></a><a class="code" href="DOMHelper.hpp.html#a10">00251</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00252             <font class="keyword">const</font> <a class="code" href="class_dom_node.html">DOM_Node</a>&amp;     theObject,
00253             <font class="keywordtype">int</font>                 <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00254 <font class="keyword"></font>{
00255     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00256 }
00257 
00258 
00259 
00268 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00269"></a><a class="code" href="DOMHelper.hpp.html#a11">00269</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00270             <font class="keyword">const</font> DOM_NamedNodeMap&amp;     theObject,
00271             <font class="keywordtype">int</font>                         <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00272 <font class="keyword"></font>{
00273     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00274 }
00275 
00276 
00277 
00286 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00287"></a><a class="code" href="DOMHelper.hpp.html#a12">00287</a> <a class="code" href="XalanDOMString.hpp.html#a7">operator!=</a>(
00288             <font class="keyword">const</font> DOM_NodeList&amp;     theObject,
00289             <font class="keywordtype">int</font>                     <font class="comment">/* theAddress */</font>)<font class="keyword">
</font>00290 <font class="keyword"></font>{
00291     <font class="keywordflow">return</font> theObject != <font class="keyword">static_cast</font>&lt;<font class="keyword">const</font> DOM_NullPtr*&gt;(0);
00292 }
00293 
00294 
00295 
00296 <font class="comment">// This class is a big hack, so we can get at the pointer to the</font>
00297 <font class="comment">// internal implementation of a DOM_Node, for the purposes of hashing</font>
00298 <font class="comment">// and implementing operator&lt;().</font>
<a name="l00299"></a><a class="code" href="class_xalan_dom_nodehack.html">00299</a> <font class="keyword">class </font><a class="code" href="class_xalan_dom_nodehack.html">XALAN_DOM_NodeHack</a> : <font class="keyword">public</font> <a class="code" href="class_dom_node.html">DOM_Node</a>
00300 {
00301 <font class="keyword">public</font>:
00302 
<a name="l00308"></a><a class="code" href="class_xalan_dom_nodehack.html#a0">00308</a>     <a class="code" href="class_xalan_dom_nodehack.html#a0">XALAN_DOM_NodeHack</a>(<font class="keyword">const</font> <a class="code" href="class_dom_node.html">DOM_Node</a>&amp;      theOtherNode) :
00309         <a class="code" href="class_dom_node.html">DOM_Node</a>(theOtherNode)
00310     {
00311     }
00312 
<a name="l00319"></a><a class="code" href="class_xalan_dom_nodehack.html#a1">00319</a>     <a class="code" href="class_xalan_dom_nodehack.html#a0">XALAN_DOM_NodeHack</a>(NodeImpl*    theOtherNode) :
00320         <a class="code" href="class_dom_node.html">DOM_Node</a>(theOtherNode)
00321     {
00322     }
00323 
<a name="l00324"></a><a class="code" href="class_xalan_dom_nodehack.html#a2">00324</a>     <a class="code" href="class_xalan_dom_nodehack.html#a2">~XALAN_DOM_NodeHack</a>()<font class="keyword">
</font>00325 <font class="keyword">    </font>{
00326     }
00327 
00333     NodeImpl*
<a name="l00334"></a><a class="code" href="class_xalan_dom_nodehack.html#a3">00334</a>     <a class="code" href="class_xalan_dom_nodehack.html#a3">getImplementationObject</a>()<font class="keyword"> const
</font>00335 <font class="keyword">    </font>{
00336         <font class="keywordflow">return</font> fImpl;
00337     }
00338 
00339     <font class="keyword">friend</font> <font class="keywordtype">bool</font> <a class="code" href="class_xalan_dom_nodehack.html#l1">operator&lt;</a>(<font class="keyword">const</font> <a class="code" href="class_xalan_dom_nodehack.html">XALAN_DOM_NodeHack</a>&amp;, <font class="keyword">const</font> <a class="code" href="class_xalan_dom_nodehack.html">XALAN_DOM_NodeHack</a>&amp;);
<a name="l00340"></a><a class="code" href="class_xalan_dom_nodehack.html#l0">00340</a>     <font class="keyword">friend</font> <font class="keyword">struct </font><a class="code" href="class_dom_nodehashfunction.html">DOM_NodeHashFunction</a>;
00341 };
00342 
00343 
00344 
00345 <font class="comment">// $$$ ToDo:  This sort of address comparison, is undefined behavior</font>
00346 <font class="comment">// according to the C++ standard, but it should work on 99.99% of</font>
00347 <font class="comment">// architectures.  We're only using it until STL hash containers are</font>
00348 <font class="comment">// available.</font>
00349 
00356 <font class="keyword">inline</font> <font class="keywordtype">bool</font>
<a name="l00357"></a><a class="code" href="DOMHelper.hpp.html#a13">00357</a> <a class="code" href="QName.hpp.html#a3">operator&lt;</a>(
00358             <font class="keyword">const</font> <a class="code" href="class_xalan_dom_nodehack.html">XALAN_DOM_NodeHack</a>&amp;   theLHS,
00359             <font class="keyword">const</font> <a class="code" href="class_xalan_dom_nodehack.html">XALAN_DOM_NodeHack</a>&amp;   theRHS)<font class="keyword">
</font>00360 <font class="keyword"></font>{
00361     <font class="keywordflow">return</font> theLHS.fImpl &lt; theRHS.fImpl ? <font class="keyword">true</font> : <font class="keyword">false</font>;
00362 }
00363 
00364 
00365 
00369 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00370 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_dom_nodehashfunction.html">DOM_NodeHashFunction</a> : <font class="keyword">public</font> unary_function&lt;DOM_Node, size_t&gt;
00371 #else
<a name="l00372"></a><a class="code" href="class_dom_nodehashfunction.html">00372</a> struct <a class="code" href="class_dom_nodehashfunction.html">DOM_NodeHashFunction</a> : <font class="keyword">public</font> std::unary_function&lt;DOM_Node, size_t&gt;
00373 #endif
00374 {
00381     result_type
<a name="l00382"></a><a class="code" href="class_dom_nodehashfunction.html#a0">00382</a>     <a class="code" href="class_dom_nodehashfunction.html#a0">operator() </a>(<font class="keyword">const</font> argument_type&amp;    theKey)<font class="keyword"> const
</font>00383 <font class="keyword">    </font>{
00384         <font class="keywordflow">return</font> <font class="keyword">reinterpret_cast</font>&lt;result_type&gt;(XALAN_DOM_NodeHack(theKey).fImpl);
00385     }
00386 };
00387 
00388 
00389 
00393 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00394 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_dom_elementhashfunction.html">DOM_ElementHashFunction</a> : <font class="keyword">public</font> unary_function&lt;DOM_Element, size_t&gt;
00395 #else
<a name="l00396"></a><a class="code" href="class_dom_elementhashfunction.html">00396</a> struct <a class="code" href="class_dom_elementhashfunction.html">DOM_ElementHashFunction</a> : <font class="keyword">public</font> std::unary_function&lt;DOM_Element, size_t&gt;
00397 #endif
00398 {
00405     result_type
<a name="l00406"></a><a class="code" href="class_dom_elementhashfunction.html#a0">00406</a>     <a class="code" href="class_dom_elementhashfunction.html#a0">operator() </a>(<font class="keyword">const</font> argument_type&amp;    theKey)<font class="keyword"> const
</font>00407 <font class="keyword">    </font>{
00408         <font class="keywordflow">return</font> <font class="keyword">static_cast</font>&lt;result_type&gt;(DOM_NodeHashFunction()(theKey));
00409     }
00410 };
00411 
00412 
00413 
00414 <font class="preprocessor">#endif  // DOMHELPER_HEADER_GUARD_1357924680
</font></div></pre><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="images/dot.gif" width="1"></TD></TR></TABLE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="80%">
	<TR>
		<TD WIDTH="80%" VALIGN="TOP">
			<P ALIGN="CENTER"><B>Xalan-C++ XSL Transformer Version 1.1</B><BR>
			Copyright &copy; 2000, 2001 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">
		</TD>
	</TR>
</TABLE>