Sophie

Sophie

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

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:44:01 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>STLHelper.hpp</h1><a href="STLHelper.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(STLHELPERS_HEADER_GUARD_1357924680)
</font><a name="l00058"></a><a class="code" href="STLHelper.hpp.html#a0">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define STLHELPERS_HEADER_GUARD_1357924680
</font>00059 <font class="preprocessor"></font>
00060 
00061 
00062 <font class="comment">// Base include file.  Must be first.</font>
00063 <font class="preprocessor">#include "<a class="code" href="PlatformSupportDefinitions.hpp.html">PlatformSupportDefinitions.hpp</a>"</font>
00064 
00065 
00066 
00067 <font class="preprocessor">#include &lt;algorithm&gt;</font>
00068 <font class="preprocessor">#include &lt;functional&gt;</font>
00069 
00070 
00071 
00075 <font class="keyword">template</font> &lt;<font class="keyword">class </font>T&gt;
00076 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00077 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_deletefunctor.html">DeleteFunctor</a> : <font class="keyword">public</font> unary_function&lt;const T*, void&gt;
00078 #else
<a name="l00079"></a><a class="code" href="class_deletefunctor.html">00079</a> struct <a class="code" href="class_deletefunctor.html">DeleteFunctor</a> : <font class="keyword">public</font> std::unary_function&lt;const T*, void&gt;
00080 #endif
00081 {
00082 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00083 <font class="preprocessor"></font>    <font class="keyword">typedef</font> unary_function&lt;<font class="keyword">const</font> T*, <font class="keywordtype">void</font>&gt;  BaseClassType;
00084 <font class="preprocessor">#else
</font><a name="l00085"></a><a class="code" href="class_deletefunctor.html#s0">00085</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__unary_function.html">std::unary_function</a>&lt;<font class="keyword">const</font> T*, <font class="keywordtype">void</font>&gt; BaseClassType;
00086 <font class="preprocessor">#endif
</font>00087 <font class="preprocessor"></font>
<a name="l00088"></a><a class="code" href="class_deletefunctor.html#s1">00088</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type     result_type;
<a name="l00089"></a><a class="code" href="class_deletefunctor.html#s2">00089</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::argument_type   argument_type;
00090 
00096     result_type
<a name="l00097"></a><a class="code" href="class_deletefunctor.html#a0">00097</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(argument_type    thePointer)<font class="keyword"> const
</font>00098 <font class="keyword">    </font>{
00099 <font class="preprocessor">#if defined(XALAN_CANNOT_DELETE_CONST)
</font>00100 <font class="preprocessor"></font>        <font class="keyword">delete</font> (T*)thePointer;
00101 <font class="preprocessor">#else
</font>00102 <font class="preprocessor"></font>        <font class="keyword">delete</font> thePointer;
00103 <font class="preprocessor">#endif
</font>00104 <font class="preprocessor"></font>    }
00105 };
00106 
00107 
00108 
00109 <font class="preprocessor">#if !defined(XALAN_SGI_BASED_STL)
</font>00110 <font class="preprocessor"></font>
00115 <font class="keyword">template</font> &lt;<font class="keyword">class </font>PairType&gt;
00116 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00117 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_select1st.html">select1st</a> : <font class="keyword">public</font> unary_function&lt;PairType, PairType::first_type&gt;
00118 #else
<a name="l00119"></a><a class="code" href="class_select1st.html">00119</a> struct <a class="code" href="class_select1st.html">select1st</a> : <font class="keyword">public</font> std::unary_function&lt;PairType, PairType::first_type&gt;
00120 #endif
00121 {
00122 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00123 <font class="preprocessor"></font>    <font class="keyword">typedef</font> unary_function&lt;PairType, PairType::first_type&gt;  BaseClassType;
00124 <font class="preprocessor">#else
</font><a name="l00125"></a><a class="code" href="class_select1st.html#s0">00125</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__unary_function.html">std::unary_function</a>&lt;PairType, PairType::first_type&gt; BaseClassType;
00126 <font class="preprocessor">#endif
</font>00127 <font class="preprocessor"></font>
<a name="l00128"></a><a class="code" href="class_select1st.html#s1">00128</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type     result_type;
<a name="l00129"></a><a class="code" href="class_select1st.html#s2">00129</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::argument_type   argument_type;
00130 
<a name="l00131"></a><a class="code" href="class_select1st.html#s3">00131</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> PairType                       value_type;
00132 
00139     <font class="keyword">typename</font> result_type
<a name="l00140"></a><a class="code" href="class_select1st.html#a0">00140</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(<font class="keyword">const</font> <font class="keyword">typename</font> argument_type&amp;    thePair)<font class="keyword"> const
</font>00141 <font class="keyword">    </font>{
00142         <font class="keywordflow">return</font> thePair.first;
00143     }
00144 };
00145 
00146 
00147 
00152 <font class="keyword">template</font> &lt;<font class="keyword">class </font>PairType&gt;
00153 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00154 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_select2nd.html">select2nd</a> : <font class="keyword">public</font> unary_function&lt;PairType, PairType::second_type&gt;
00155 #else
<a name="l00156"></a><a class="code" href="class_select2nd.html">00156</a> struct <a class="code" href="class_select2nd.html">select2nd</a> : <font class="keyword">public</font> std::unary_function&lt;PairType, PairType::second_type&gt;
00157 #endif
00158 {
00159 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00160 <font class="preprocessor"></font>    <font class="keyword">typedef</font> unary_function&lt;PairType, PairType::second_type&gt; BaseClassType;
00161 <font class="preprocessor">#else
</font><a name="l00162"></a><a class="code" href="class_select2nd.html#s0">00162</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__unary_function.html">std::unary_function</a>&lt;PairType, PairType::second_type&gt;    BaseClassType;
00163 <font class="preprocessor">#endif
</font>00164 <font class="preprocessor"></font>
<a name="l00165"></a><a class="code" href="class_select2nd.html#s1">00165</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type     result_type;
<a name="l00166"></a><a class="code" href="class_select2nd.html#s2">00166</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::argument_type   argument_type;
00167 
<a name="l00168"></a><a class="code" href="class_select2nd.html#s3">00168</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> PairType                       value_type;
00169 
00176     <font class="keyword">typename</font> result_type
<a name="l00177"></a><a class="code" href="class_select2nd.html#a0">00177</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(<font class="keyword">const</font> <font class="keyword">typename</font> argument_type&amp;    thePair)<font class="keyword"> const
</font>00178 <font class="keyword">    </font>{
00179         <font class="keywordflow">return</font> thePair.second;
00180     }
00181 };
00182 
00183 <font class="preprocessor">#endif
</font>00184 <font class="preprocessor"></font>
00185 
00186 
00190 <font class="keyword">template</font> &lt;<font class="keyword">class </font>T&gt;
00191 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00192 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_mapvaluedeletefunctor.html">MapValueDeleteFunctor</a> : <font class="keyword">public</font> unary_function&lt;const typename T::value_type&amp;, void&gt;
00193 #else
<a name="l00194"></a><a class="code" href="class_mapvaluedeletefunctor.html">00194</a> struct <a class="code" href="class_mapvaluedeletefunctor.html">MapValueDeleteFunctor</a> : <font class="keyword">public</font> std::unary_function&lt;const typename T::value_type&amp;, void&gt;
00195 #endif
00196 {
00197 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00198 <font class="preprocessor"></font>    <font class="keyword">typedef</font> unary_function&lt;<font class="keyword">const</font> <font class="keyword">typename</font> T::value_type&amp;, <font class="keywordtype">void</font>&gt;     BaseClassType;
00199 <font class="preprocessor">#else
</font><a name="l00200"></a><a class="code" href="class_mapvaluedeletefunctor.html#s0">00200</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__unary_function.html">std::unary_function</a>&lt;<font class="keyword">const</font> <font class="keyword">typename</font> T::value_type&amp;, <font class="keywordtype">void</font>&gt;    BaseClassType;
00201 <font class="preprocessor">#endif
</font>00202 <font class="preprocessor"></font>
<a name="l00203"></a><a class="code" href="class_mapvaluedeletefunctor.html#s1">00203</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type     result_type;
<a name="l00204"></a><a class="code" href="class_mapvaluedeletefunctor.html#s2">00204</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::argument_type   argument_type;
00205 
00212     result_type
<a name="l00213"></a><a class="code" href="class_mapvaluedeletefunctor.html#a0">00213</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(argument_type    thePair)<font class="keyword"> const
</font>00214 <font class="keyword">    </font>{
00215         <font class="keyword">delete</font> thePair.second;
00216     }
00217 };
00218 
00219 
00220 
00221 <font class="keyword">template</font>&lt;<font class="keyword">class </font>T&gt;
00222 <a class="code" href="class_mapvaluedeletefunctor.html">MapValueDeleteFunctor</a>&lt;T&gt;
<a name="l00223"></a><a class="code" href="STLHelper.hpp.html#a1">00223</a> <a class="code" href="STLHelper.hpp.html#a1">makeMapValueDeleteFunctor</a>(<font class="keyword">const</font> T&amp;  <font class="comment">/* theMap */</font>)<font class="keyword">
</font>00224 <font class="keyword"></font>{
00225     <font class="keywordflow">return</font> <a class="code" href="class_mapvaluedeletefunctor.html">MapValueDeleteFunctor</a>&lt;T&gt;();
00226 }
00227 
00228 
00229 
00230 <font class="keyword">template</font> &lt;<font class="keyword">class </font>T&gt;
00231 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00232 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_mapkeydeletefunctor.html">MapKeyDeleteFunctor</a> : <font class="keyword">public</font> unary_function&lt;const typename T::value_type&amp;, void&gt;
00233 #else
<a name="l00234"></a><a class="code" href="class_mapkeydeletefunctor.html">00234</a> struct <a class="code" href="class_mapkeydeletefunctor.html">MapKeyDeleteFunctor</a> : <font class="keyword">public</font> std::unary_function&lt;const typename T::value_type&amp;, void&gt;
00235 #endif
00236 {
00237 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00238 <font class="preprocessor"></font>    <font class="keyword">typedef</font> unary_function&lt;<font class="keyword">const</font> <font class="keyword">typename</font> T::value_type&amp;, <font class="keywordtype">void</font>&gt;     BaseClassType;
00239 <font class="preprocessor">#else
</font><a name="l00240"></a><a class="code" href="class_mapkeydeletefunctor.html#s0">00240</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__unary_function.html">std::unary_function</a>&lt;<font class="keyword">const</font> <font class="keyword">typename</font> T::value_type&amp;, <font class="keywordtype">void</font>&gt;    BaseClassType;
00241 <font class="preprocessor">#endif
</font>00242 <font class="preprocessor"></font>
<a name="l00243"></a><a class="code" href="class_mapkeydeletefunctor.html#s1">00243</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type     result_type;
<a name="l00244"></a><a class="code" href="class_mapkeydeletefunctor.html#s2">00244</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::argument_type   argument_type;
00245 
00252     result_type
<a name="l00253"></a><a class="code" href="class_mapkeydeletefunctor.html#a0">00253</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(argument_type    thePair)<font class="keyword">
</font>00254 <font class="keyword">    </font>{
00255         <font class="keyword">delete</font> thePair.first;
00256     }
00257 };
00258 
00259 
00260 
00261 <font class="keyword">template</font>&lt;<font class="keyword">class </font>T&gt;
00262 <a class="code" href="class_mapkeydeletefunctor.html">MapKeyDeleteFunctor</a>&lt;T&gt;
<a name="l00263"></a><a class="code" href="STLHelper.hpp.html#a2">00263</a> <a class="code" href="STLHelper.hpp.html#a2">makeMapKeyDeleteFunctor</a>(<font class="keyword">const</font> T&amp;    <font class="comment">/* theMap */</font>)<font class="keyword">
</font>00264 <font class="keyword"></font>{
00265     <font class="keywordflow">return</font> <a class="code" href="class_mapkeydeletefunctor.html">MapKeyDeleteFunctor</a>&lt;T&gt;();
00266 }
00267 
00268 
00269 
00279 <font class="keyword">template</font>&lt;<font class="keyword">class </font>T&gt;
00280 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00281 <font class="preprocessor"></font><font class="keyword">struct </font><a class="code" href="class_less_null_terminated_arrays.html">less_null_terminated_arrays</a> : <font class="keyword">public</font> binary_function&lt;const T*, const T*, bool&gt;
00282 #else
<a name="l00283"></a><a class="code" href="class_less_null_terminated_arrays.html">00283</a> struct <a class="code" href="class_less_null_terminated_arrays.html">less_null_terminated_arrays</a> : <font class="keyword">public</font> std::binary_function&lt;const T*, const T*, bool&gt;
00284 #endif
00285 {
00286 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES)
</font>00287 <font class="preprocessor"></font>    <font class="keyword">typedef</font> binary_function&lt;<font class="keyword">const</font> T*, <font class="keyword">const</font> T*, <font class="keywordtype">bool</font>&gt;           BaseClassType;
00288 <font class="preprocessor">#else
</font><a name="l00289"></a><a class="code" href="class_less_null_terminated_arrays.html#s0">00289</a> <font class="preprocessor"></font>    <font class="keyword">typedef</font> <a class="code" href="class_std__binary_function.html">std::binary_function</a>&lt;<font class="keyword">const</font> T*, <font class="keyword">const</font> T*, <font class="keywordtype">bool</font>&gt;      BaseClassType;
00290 <font class="preprocessor">#endif
</font>00291 <font class="preprocessor"></font>
<a name="l00292"></a><a class="code" href="class_less_null_terminated_arrays.html#s1">00292</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::result_type             result_type;
<a name="l00293"></a><a class="code" href="class_less_null_terminated_arrays.html#s2">00293</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::first_argument_type     first_argument_type;
<a name="l00294"></a><a class="code" href="class_less_null_terminated_arrays.html#s3">00294</a>     <font class="keyword">typedef</font> <font class="keyword">typename</font> BaseClassType::second_argument_type    second_argument_type;
00295 
00304     result_type
<a name="l00305"></a><a class="code" href="class_less_null_terminated_arrays.html#a0">00305</a>     <a class="code" href="class_deletefunctor.html#a0">operator()</a>(
00306             first_argument_type     theLHS,
00307             second_argument_type    theRHS)<font class="keyword"> const
</font>00308 <font class="keyword">    </font>{
00309         <font class="keywordflow">while</font>(*theLHS &amp;&amp; *theRHS)
00310         {
00311             <font class="keywordflow">if</font> (*theLHS != *theRHS)
00312             {
00313                 <font class="keywordflow">break</font>;
00314             }
00315             <font class="keywordflow">else</font>
00316             {
00317                 theLHS++;
00318                 theRHS++;
00319             }
00320         }
00321 
00322         <font class="keywordflow">return</font> *theLHS &lt; *theRHS ? <font class="keyword">true</font> : <font class="keyword">false</font>;
00323     }
00324 };
00325 
00326 
00327 
00328 <font class="keyword">template</font>&lt;<font class="keyword">class </font>CollectionType&gt;
<a name="l00329"></a><a class="code" href="class_collectionclearguard.html">00329</a> <font class="keyword">class </font><a class="code" href="class_collectionclearguard.html">CollectionClearGuard</a>
00330 {
00331 <font class="keyword">public</font>:
00332 
<a name="l00333"></a><a class="code" href="class_collectionclearguard.html#a0">00333</a>     <a class="code" href="class_collectionclearguard.html#a0">CollectionClearGuard</a>(CollectionType&amp;    theCollection) :
00334         m_collection(&amp;theCollection)
00335     {
00336     }
00337 
<a name="l00338"></a><a class="code" href="class_collectionclearguard.html#a1">00338</a>     <a class="code" href="class_collectionclearguard.html#a1">~CollectionClearGuard</a>()<font class="keyword">
</font>00339 <font class="keyword">    </font>{
00340         <font class="keywordflow">if</font> (m_collection != 0)
00341         {
00342             m_collection-&gt;clear();
00343         }
00344     }
00345 
00346     <font class="keywordtype">void</font>
<a name="l00347"></a><a class="code" href="class_collectionclearguard.html#a2">00347</a>     <a class="code" href="class_collectionclearguard.html#a2">release</a>()<font class="keyword">
</font>00348 <font class="keyword">    </font>{
00349         m_collection = 0;
00350     }
00351 
00352 <font class="keyword">private</font>:
00353 
00354     <font class="comment">// Not implemented...</font>
00355     <a class="code" href="class_collectionclearguard.html#a0">CollectionClearGuard</a>(<font class="keyword">const</font> <a class="code" href="class_collectionclearguard.html">CollectionClearGuard</a>&lt;CollectionType&gt;&amp;);
00356 
00357     <a class="code" href="class_collectionclearguard.html">CollectionClearGuard</a>&lt;CollectionType&gt;&amp;
00358     operator=(<font class="keyword">const</font> <a class="code" href="class_collectionclearguard.html">CollectionClearGuard</a>&lt;CollectionType&gt;&amp;);
00359 
00360     <font class="comment">// Data members...</font>
00361     CollectionType*     m_collection;
00362 };
00363 
00364 
00365 
00366 <font class="keyword">template</font>&lt;<font class="keyword">class </font>CollectionType, <font class="keyword">class </font><a class="code" href="class_deletefunctor.html">DeleteFunctorType</a>&gt;
<a name="l00367"></a><a class="code" href="class_collectiondeleteguard.html">00367</a> <font class="keyword">class </font><a class="code" href="class_collectiondeleteguard.html">CollectionDeleteGuard</a>
00368 {
00369 <font class="keyword">public</font>:
00370 
<a name="l00371"></a><a class="code" href="class_collectiondeleteguard.html#a0">00371</a>     <a class="code" href="class_collectiondeleteguard.html#a0">CollectionDeleteGuard</a>(CollectionType&amp;   theCollection) :
00372         m_collection(&amp;theCollection)
00373     {
00374     }
00375 
<a name="l00376"></a><a class="code" href="class_collectiondeleteguard.html#a1">00376</a>     <a class="code" href="class_collectiondeleteguard.html#a1">~CollectionDeleteGuard</a>()<font class="keyword">
</font>00377 <font class="keyword">    </font>{
00378         <font class="keywordflow">if</font> (m_collection != 0)
00379         {
00380 <font class="preprocessor">#if !defined(XALAN_NO_NAMESPACES)
</font>00381 <font class="preprocessor"></font>            <font class="keyword">using</font> std::for_each;
00382 <font class="preprocessor">#endif
</font>00383 <font class="preprocessor"></font>
00384             <font class="comment">// Delete all of the objects in the temp vector.</font>
00385             for_each(m_collection-&gt;begin(),
00386                      m_collection-&gt;end(),
00387                      DeleteFunctorType());
00388         }
00389     }
00390 
00391     <font class="keywordtype">void</font>
<a name="l00392"></a><a class="code" href="class_collectiondeleteguard.html#a2">00392</a>     <a class="code" href="class_collectiondeleteguard.html#a2">release</a>()<font class="keyword">
</font>00393 <font class="keyword">    </font>{
00394         m_collection = 0;
00395     }
00396 
00397 <font class="keyword">private</font>:
00398 
00399     <font class="comment">// Not implemented...</font>
00400     <a class="code" href="class_collectiondeleteguard.html#a0">CollectionDeleteGuard</a>(<font class="keyword">const</font> <a class="code" href="class_collectiondeleteguard.html">CollectionDeleteGuard</a>&lt;CollectionType, <a class="code" href="class_deletefunctor.html">DeleteFunctorType</a>&gt;&amp;);
00401 
00402     <a class="code" href="class_collectiondeleteguard.html">CollectionDeleteGuard</a>&lt;CollectionType, <a class="code" href="class_deletefunctor.html">DeleteFunctorType</a>&gt;&amp;
00403     operator=(<font class="keyword">const</font> <a class="code" href="class_collectiondeleteguard.html">CollectionDeleteGuard</a>&lt;CollectionType, <a class="code" href="class_deletefunctor.html">DeleteFunctorType</a>&gt;&amp;);
00404 
00405     <font class="comment">// Data members...</font>
00406     CollectionType*     m_collection;
00407 };
00408 
00409 
00410 
00411 <font class="preprocessor">#endif  // STLHELPERS_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>