| <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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> |
| <hr><h1>XalanDiagnosticMemoryManager.hpp</h1><a href="XalanDiagnosticMemoryManager_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-2005 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(XALAN_DIAGNOSTICMEMORYMANAGER_HEADER_GUARD_1357924680)</font> |
| <a name="l00017"></a><a class="code" href="XalanDiagnosticMemoryManager_8hpp.html#a0">00017</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_DIAGNOSTICMEMORYMANAGER_HEADER_GUARD_1357924680</font> |
| 00018 <font class="preprocessor"></font> |
| 00019 |
| 00020 |
| 00021 <font class="preprocessor">#include "<a class="code" href="XalanHarnessDefinitions_8hpp.html">xalanc/Harness/XalanHarnessDefinitions.hpp</a>"</font> |
| 00022 |
| 00023 |
| 00024 |
| 00025 <font class="preprocessor">#include <cstddef></font> |
| 00026 |
| 00027 |
| 00028 |
| 00029 <font class="preprocessor">#if defined(XALAN_CLASSIC_IOSTREAMS)</font> |
| 00030 <font class="preprocessor"></font><font class="preprocessor">#include <iostream.h></font> |
| 00031 <font class="preprocessor">#else</font> |
| 00032 <font class="preprocessor"></font><font class="preprocessor">#include <iosfwd></font> |
| 00033 <font class="preprocessor">#include <ios></font> |
| 00034 <font class="preprocessor">#endif</font> |
| 00035 <font class="preprocessor"></font> |
| 00036 |
| 00037 |
| 00038 <font class="preprocessor">#include "xercesc/framework/MemoryManager.hpp"</font> |
| 00039 |
| 00040 |
| 00041 |
| 00042 <font class="preprocessor">#include "<a class="code" href="XalanMap_8hpp.html">xalanc/Include/XalanMap.hpp</a>"</font> |
| 00043 |
| 00044 |
| 00045 |
| 00046 XALAN_CPP_NAMESPACE_BEGIN |
| 00047 |
| 00048 |
| 00049 |
| <a name="l00050"></a><a class="code" href="XalanDiagnosticMemoryManager_8hpp.html#a1">00050</a> <a class="code" href="XSLTInputSource_8hpp.html#a3">XALAN_USING_XERCES</a>(MemoryManager) |
| 00051 |
| 00052 |
| 00053 |
| 00054 <font class="keyword">class </font>XALAN_HARNESS_EXPORT XalanDiagnosticMemoryManager : <font class="keyword">public</font> MemoryManager |
| 00055 { |
| 00056 <font class="keyword">public</font>: |
| 00057 |
| 00058 <font class="keyword">typedef</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> int_type; |
| 00059 |
| 00060 <font class="preprocessor">#if defined(XALAN_NO_STD_NAMESPACE)</font> |
| 00061 <font class="preprocessor"></font> <font class="keyword">typedef</font> ostream StreamType; |
| 00062 <font class="preprocessor">#else</font> |
| 00063 <font class="preprocessor"></font> <font class="keyword">typedef</font> std::ostream StreamType; |
| 00064 <font class="preprocessor">#endif</font> |
| 00065 <font class="preprocessor"></font> |
| 00066 <font class="preprocessor">#if defined(XALAN_STRICT_ANSI_HEADERS)</font> |
| 00067 <font class="preprocessor"></font> <font class="keyword">typedef</font> std::size_t size_type; |
| 00068 <font class="preprocessor">#else</font> |
| 00069 <font class="preprocessor"></font> <font class="keyword">typedef</font> size_t size_type; |
| 00070 <font class="preprocessor">#endif</font> |
| 00071 <font class="preprocessor"></font> |
| 00072 <font class="keyword">class </font>LockException |
| 00073 { |
| 00074 <font class="keyword">public</font>: |
| 00075 |
| 00076 LockException()<font class="keyword"></font> |
| 00077 <font class="keyword"> </font>{ |
| 00078 } |
| 00079 |
| 00080 ~LockException()<font class="keyword"></font> |
| 00081 <font class="keyword"> </font>{ |
| 00082 } |
| 00083 }; |
| 00084 |
| 00085 XalanDiagnosticMemoryManager( |
| 00086 MemoryManager& theMemoryManager, |
| 00087 <font class="keywordtype">bool</font> fAssertErrors = <font class="keyword">false</font>, |
| 00088 StreamType* theStream = 0); |
| 00089 |
| 00090 <font class="keyword">virtual</font> |
| 00091 ~XalanDiagnosticMemoryManager(); |
| 00092 |
| 00093 <font class="keyword">virtual</font> <font class="keywordtype">void</font>* |
| 00094 allocate(size_type size); |
| 00095 |
| 00096 <font class="keyword">virtual</font> <font class="keywordtype">void</font> |
| 00097 deallocate(<font class="keywordtype">void</font>* pointer); |
| 00098 |
| 00099 <font class="keywordtype">bool</font> |
| 00100 getAssertErrors()<font class="keyword"> const</font> |
| 00101 <font class="keyword"> </font>{ |
| 00102 <font class="keywordflow">return</font> m_assertErrors; |
| 00103 } |
| 00104 |
| 00105 <font class="keywordtype">void</font> |
| 00106 setAssertErrors(<font class="keywordtype">bool</font> fFlag)<font class="keyword"></font> |
| 00107 <font class="keyword"> </font>{ |
| 00108 m_assertErrors = fFlag; |
| 00109 } |
| 00110 |
| 00111 <font class="comment">// Get the high-water mark (the highest amount</font> |
| 00112 <font class="comment">// that was allocated at any particular point).</font> |
| 00113 size_type |
| 00114 getHighWaterMark()<font class="keyword"> const</font> |
| 00115 <font class="keyword"> </font>{ |
| 00116 <font class="keywordflow">return</font> m_highWaterMark; |
| 00117 } |
| 00118 |
| 00119 <font class="comment">// Get the number of bytes currently allocated.</font> |
| 00120 size_type |
| 00121 getAllocated()<font class="keyword"> const</font> |
| 00122 <font class="keyword"> </font>{ |
| 00123 <font class="keywordflow">return</font> m_currentAllocated; |
| 00124 } |
| 00125 |
| 00126 <font class="comment">// Get the current number of outstanding allocations.</font> |
| 00127 size_type |
| 00128 getAllocations()<font class="keyword"> const</font> |
| 00129 <font class="keyword"> </font>{ |
| 00130 <font class="keywordflow">return</font> m_allocations.size(); |
| 00131 } |
| 00132 |
| 00133 <font class="keyword">struct </font>Data |
| 00134 { |
| 00135 Data() : |
| 00136 m_size(0), |
| 00137 m_sequence(0)<font class="keyword"></font> |
| 00138 <font class="keyword"> </font>{ |
| 00139 } |
| 00140 |
| 00141 Data( |
| 00142 size_type theSize, |
| 00143 size_type theSequence) : |
| 00144 m_size(theSize), |
| 00145 m_sequence(theSequence)<font class="keyword"></font> |
| 00146 <font class="keyword"> </font>{ |
| 00147 } |
| 00148 |
| 00149 size_type m_size; |
| 00150 |
| 00151 size_type m_sequence; |
| 00152 }; |
| 00153 |
| 00154 <font class="keyword">typedef</font> <a class="code" href="classXalanMap.html">XalanMap<void*, Data></a> MapType; |
| 00155 |
| 00156 <font class="keyword">typedef</font> MapType::const_iterator const_iterator; |
| 00157 |
| 00158 const_iterator |
| 00159 getAllocationsIterator()<font class="keyword"> const</font> |
| 00160 <font class="keyword"> </font>{ |
| 00161 <font class="keywordflow">return</font> m_allocations.begin(); |
| 00162 } |
| 00163 |
| 00164 <font class="keywordtype">void</font> |
| 00165 lock()<font class="keyword"></font> |
| 00166 <font class="keyword"> </font>{ |
| 00167 m_locked = <font class="keyword">true</font>; |
| 00168 } |
| 00169 |
| 00170 <font class="keywordtype">void</font> |
| 00171 unlock()<font class="keyword"></font> |
| 00172 <font class="keyword"> </font>{ |
| 00173 m_locked = <font class="keyword">false</font>; |
| 00174 } |
| 00175 |
| 00176 <font class="keyword">enum</font> |
| 00177 { |
| 00178 defaultBytesToDump = 20u |
| 00179 }; |
| 00180 |
| 00181 <font class="keywordtype">void</font> |
| 00182 dumpStatistics( |
| 00183 StreamType* theStream = 0, |
| 00184 size_type theBytesToDump = defaultBytesToDump); |
| 00185 |
| 00186 <font class="keyword">private</font>: |
| 00187 |
| 00188 XalanDiagnosticMemoryManager(<font class="keyword">const</font> XalanDiagnosticMemoryManager&); |
| 00189 |
| 00190 XalanDiagnosticMemoryManager& |
| 00191 operator=(<font class="keyword">const</font> XalanDiagnosticMemoryManager&); |
| 00192 |
| 00193 MemoryManager& m_memoryManager; |
| 00194 |
| 00195 <font class="keywordtype">bool</font> m_assertErrors; |
| 00196 |
| 00197 <font class="keywordtype">bool</font> m_locked; |
| 00198 |
| 00199 size_type m_sequence; |
| 00200 |
| 00201 size_type m_highWaterMark; |
| 00202 |
| 00203 size_type m_currentAllocated; |
| 00204 |
| 00205 MapType m_allocations; |
| 00206 |
| 00207 StreamType* m_stream; |
| 00208 }; |
| 00209 |
| 00210 |
| 00211 |
| 00212 XALAN_CPP_NAMESPACE_END |
| 00213 |
| 00214 |
| 00215 |
| 00216 <font class="preprocessor">#endif // XALAN_DIAGNOSTICMEMORYMANAGER_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 © 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>
|