Sophie

Sophie

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

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>CountersTable.hpp</h1><a href="CountersTable.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-2000 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(XALAN_COUNTERSTABLE_HEADER_GUARD_1357924680)
</font><a name="l00058"></a><a class="code" href="CountersTable.hpp.html#a0">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_ELEMNUMBER_HEADER_GUARD_1357924680 
</font>00059 <font class="preprocessor"></font>
00066 
00067 <font class="comment">// Base include file.  Must be first.</font>
00068 <font class="preprocessor">#include &lt;<a class="code" href="XSLTDefinitions.hpp.html">XSLT/XSLTDefinitions.hpp</a>&gt;</font>
00069 
00070 
00071 
00072 <font class="preprocessor">#include &lt;map&gt;</font>
00073 <font class="preprocessor">#include &lt;vector&gt;</font>
00074 
00075 
00076 
00077 <font class="preprocessor">#include "<a class="code" href="MutableNodeRefList.hpp.html">XPath/MutableNodeRefList.hpp</a>"</font>
00078 
00079 
00080 
00081 <font class="keyword">class </font><a class="code" href="class_elemnumber.html">ElemNumber</a>;
00082 <font class="keyword">class </font><a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>;
00083 
00084 
00085 
<a name="l00093"></a><a class="code" href="class_counter.html">00093</a> <font class="keyword">struct </font><a class="code" href="class_counter.html">Counter</a>
00094 {
00095 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00096 <font class="preprocessor"></font>    <font class="keyword">typedef</font> vector&lt;<a class="code" href="class_xalannode.html">XalanNode</a>*&gt;          NodeVectorType;
00097 <font class="preprocessor">#else
</font><a name="l00098"></a><a class="code" href="class_counter.html#s0">00098</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> std::vector&lt;<a class="code" href="class_xalannode.html">XalanNode</a>*&gt;     NodeVectorType;
00099 <font class="preprocessor">#endif
</font>00100 <font class="preprocessor"></font>
<a name="l00106"></a><a class="code" href="class_counter.html#m0">00106</a>     <font class="keywordtype">int</font>                 m_countNodesStartCount;
00107 
<a name="l00111"></a><a class="code" href="class_counter.html#m1">00111</a>     NodeVectorType      m_countNodes;
00112 
<a name="l00118"></a><a class="code" href="class_counter.html#m2">00118</a>     <font class="keyword">const</font> <a class="code" href="class_xalannode.html">XalanNode</a>*    m_fromNode;
00119 
<a name="l00123"></a><a class="code" href="class_counter.html#m3">00123</a>     <font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*   m_numberElem;
00124 
<a name="l00128"></a><a class="code" href="class_counter.html#a0">00128</a>     <a class="code" href="class_counter.html#a0">Counter</a>(
00129             <font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*   numberElem,
00130             NodeVectorType&amp;     countNodes) :
00131         m_countNodesStartCount(0),
00132         m_countNodes(countNodes),
00133         m_fromNode(0),
00134         m_numberElem(numberElem)
00135     {
00136     }
00137 
<a name="l00141"></a><a class="code" href="class_counter.html#a1">00141</a>     <a class="code" href="class_counter.html#a0">Counter</a>(<font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*   numberElem = 0) :
00142         m_countNodesStartCount(0),
00143         m_countNodes(),
00144         m_fromNode(0),
00145         m_numberElem(numberElem)
00146     {
00147     }
00148 
00155     <font class="keywordtype">int</font>
00156     <a class="code" href="class_counter.html#a2">getPreviouslyCounted</a>(
00157             <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>&amp;     support,
00158             <font class="keyword">const</font> <a class="code" href="class_xalannode.html">XalanNode</a>*                node) <font class="keyword">const</font>;
00159 
00163     <a class="code" href="class_xalannode.html">XalanNode</a>*
<a name="l00164"></a><a class="code" href="class_counter.html#a3">00164</a>     <a class="code" href="class_counter.html#a3">getLast</a>()<font class="keyword"> const
</font>00165 <font class="keyword">    </font>{
00166         <font class="keywordflow">return</font> m_countNodes.size() == 0 ? 0 : m_countNodes.back();
00167     }
00168 };
00169 
00170 
00171 
<a name="l00179"></a><a class="code" href="class_counterstable.html">00179</a> <font class="keyword">class </font><a class="code" href="class_counterstable.html">CountersTable</a>
00180 {
00181 <font class="keyword">public</font>:
00182 
00183 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00184 <font class="preprocessor"></font>    <font class="keyword">typedef</font> vector&lt;<a class="code" href="class_counter.html">Counter</a>&gt;                 CounterVectorType;
00185     <font class="keyword">typedef</font> map&lt;<font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*,
00186                 CounterVectorType,
00187                 less&lt;<font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*&gt; &gt;   ElemToCounterVectorMapType;
00188 <font class="preprocessor">#else
</font><a name="l00189"></a><a class="code" href="class_counterstable.html#s0">00189</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> std::vector&lt;<a class="code" href="class_counter.html">Counter</a>&gt;            CounterVectorType;
00190     <font class="keyword">typedef</font> std::map&lt;<font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*,
<a name="l00191"></a><a class="code" href="class_counterstable.html#s1">00191</a>                      CounterVectorType&gt;     ElemToCounterVectorMapType;
00192 <font class="preprocessor">#endif
</font>00193 <font class="preprocessor"></font>
<a name="l00194"></a><a class="code" href="class_counterstable.html#s2">00194</a>     <font class="keyword">typedef</font> Counter::NodeVectorType         NodeVectorType;
00195 
<a name="l00199"></a><a class="code" href="class_counterstable.html#a0">00199</a>     <a class="code" href="class_counterstable.html#a0">CountersTable</a>() :
00200         m_counterMap(),
00201         m_newFound()
00202     {
00203     };
00204 
00205 
00215     <font class="keywordtype">int</font>
00216     <a class="code" href="class_counterstable.html#a1">countNode</a>(
00217             <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>&amp;     executionContext,
00218             <font class="keyword">const</font> <a class="code" href="class_elemnumber.html">ElemNumber</a>*               numberElem,
00219             <a class="code" href="class_xalannode.html">XalanNode</a>*                      node);
00220 
00224     <font class="keywordtype">void</font>
<a name="l00225"></a><a class="code" href="class_counterstable.html#a2">00225</a>     <a class="code" href="class_counterstable.html#a2">reset</a>()<font class="keyword">
</font>00226 <font class="keyword">    </font>{
00227         m_newFound.clear();
00228 
00229         m_counterMap.clear();
00230     }
00231 
00232 <font class="keyword">private</font>:
00233 
00239     <font class="keywordtype">void</font>
00240     appendBtoFList(
00241             NodeVectorType&amp;     flist,
00242             NodeVectorType&amp;     blist);
00243 
00247     ElemToCounterVectorMapType  m_counterMap;
00248 
00249 
00253     NodeVectorType              m_newFound;
00254 };
00255 
00256 
00257 <font class="preprocessor">#endif  // !defined(XALAN_COUNTERSTABLE_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>