| <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>ICUFormatNumberFunctor.hpp</h1><a href="ICUFormatNumberFunctor_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(FUNCTIONICUFORMATNUMBERFUNCTOR_HEADER_GUARD_1357924680)</font> |
| <a name="l00017"></a><a class="code" href="ICUFormatNumberFunctor_8hpp.html#a0">00017</a> <font class="preprocessor"></font><font class="preprocessor">#define FUNCTIONICUFORMATNUMBERFUNCTOR_HEADER_GUARD_1357924680</font> |
| 00018 <font class="preprocessor"></font> |
| 00019 |
| 00020 |
| 00021 <font class="comment">// Base header file. Must be first.</font> |
| 00022 <font class="preprocessor">#include <<a class="code" href="ICUBridgeDefinitions_8hpp.html">xalanc/ICUBridge/ICUBridgeDefinitions.hpp</a>></font> |
| 00023 |
| 00024 |
| 00025 |
| 00026 <font class="preprocessor">#include <<a class="code" href="XalanMemMgrAutoPtr_8hpp.html">xalanc/Include/XalanMemMgrAutoPtr.hpp</a>></font> |
| 00027 |
| 00028 |
| 00029 |
| 00030 <font class="preprocessor">#include <<a class="code" href="XalanDecimalFormatSymbols_8hpp.html">xalanc/PlatformSupport/XalanDecimalFormatSymbols.hpp</a>></font> |
| 00031 |
| 00032 |
| 00033 |
| 00034 <font class="preprocessor">#include <<a class="code" href="StylesheetExecutionContextDefault_8hpp.html">xalanc/XSLT/StylesheetExecutionContextDefault.hpp</a>></font> |
| 00035 |
| 00036 |
| 00037 |
| 00038 <font class="preprocessor">#include <<a class="code" href="XPathExecutionContext_8hpp.html">xalanc/XPath/XPathExecutionContext.hpp</a>></font> |
| 00039 |
| 00040 |
| 00041 |
| 00042 <font class="preprocessor">#include <unicode/decimfmt.h></font> |
| 00043 |
| 00044 |
| 00045 |
| 00046 |
| 00047 XALAN_CPP_NAMESPACE_BEGIN |
| 00048 |
| <a name="l00049"></a><a class="code" href="ICUFormatNumberFunctor_8hpp.html#a1">00049</a> <font class="keyword">typedef</font> StylesheetExecutionContextDefault::FormatNumberFunctor FormatNumberFunctor; |
| 00050 |
| 00051 <font class="preprocessor">#if defined(XALAN_HAS_CPP_NAMESPACE)</font> |
| 00052 <font class="preprocessor"></font> <font class="keyword">typedef</font> U_ICU_NAMESPACE::DecimalFormat DecimalFormatType; |
| 00053 <font class="preprocessor">#else</font> |
| <a name="l00054"></a><a class="code" href="ICUFormatNumberFunctor_8hpp.html#a2">00054</a> <font class="preprocessor"></font> <font class="keyword">typedef</font> DecimalFormat DecimalFormatType; |
| 00055 <font class="preprocessor">#endif</font> |
| 00056 <font class="preprocessor"></font> |
| <a name="l00057"></a><a class="code" href="structDecimalFormatCacheStruct.html">00057</a> <font class="keyword">struct </font><a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a> |
| 00058 { |
| <a name="l00059"></a><a class="code" href="structDecimalFormatCacheStruct.html#a0">00059</a> <a class="code" href="structDecimalFormatCacheStruct.html#a0">DecimalFormatCacheStruct</a>( |
| 00060 MemoryManagerType& theManager, |
| 00061 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>& theDFS, |
| 00062 DecimalFormatType* theFormatter) : |
| 00063 |
| 00064 m_DFS(theDFS, theManager), |
| 00065 m_formatter(theFormatter) |
| 00066 { |
| 00067 } |
| 00068 |
| <a name="l00069"></a><a class="code" href="structDecimalFormatCacheStruct.html#a1">00069</a> <a class="code" href="structDecimalFormatCacheStruct.html#a0">DecimalFormatCacheStruct</a>(MemoryManagerType& theManager) : |
| 00070 m_DFS(theManager), |
| 00071 m_formatter(0) |
| 00072 { |
| 00073 } |
| 00074 |
| <a name="l00075"></a><a class="code" href="structDecimalFormatCacheStruct.html#a2">00075</a> <a class="code" href="structDecimalFormatCacheStruct.html#a0">DecimalFormatCacheStruct</a>( |
| 00076 <font class="keyword">const</font> <a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& other, |
| 00077 MemoryManagerType& theManager) : |
| 00078 m_DFS(other.m_DFS, theManager), |
| 00079 m_formatter(other.m_formatter) |
| 00080 { |
| 00081 } |
| 00082 |
| 00083 <font class="preprocessor">#if defined(XALAN_NO_SELECTIVE_TEMPLATE_INSTANTIATION)</font> |
| 00084 <font class="preprocessor"></font> <font class="keywordtype">bool</font> |
| 00085 <a class="code" href="ElemAttributeSet_8hpp.html#a2">operator<</a>(<font class="keyword">const</font> <a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& theRHS)<font class="keyword"> const</font> |
| 00086 <font class="keyword"> </font>{ |
| 00087 <font class="keywordflow">return</font> <font class="keyword">this</font> < &theRHS; |
| 00088 } |
| 00089 |
| 00090 <font class="keywordtype">bool</font> |
| 00091 <a class="code" href="ElemAttributeSet_8hpp.html#a1">operator==</a>(<font class="keyword">const</font> <a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& theRHS)<font class="keyword"> const</font> |
| 00092 <font class="keyword"> </font>{ |
| 00093 <font class="keywordflow">return</font> <font class="keyword">this</font> == &theRHS; |
| 00094 } |
| 00095 <font class="preprocessor">#endif</font> |
| 00096 <font class="preprocessor"></font> |
| <a name="l00097"></a><a class="code" href="structDecimalFormatCacheStruct.html#m0">00097</a> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a> m_DFS; |
| 00098 |
| <a name="l00099"></a><a class="code" href="structDecimalFormatCacheStruct.html#m1">00099</a> DecimalFormatType * m_formatter; |
| 00100 |
| <a name="l00101"></a><a class="code" href="classDecimalFormatCacheStruct_1_1DecimalFormatDeleteFunctor.html">00101</a> <font class="keyword">class </font>DecimalFormatDeleteFunctor |
| 00102 { |
| 00103 <font class="keyword">public</font>: |
| 00104 |
| <a name="l00105"></a><a class="code" href="classDecimalFormatCacheStruct_1_1DecimalFormatDeleteFunctor.html#a0">00105</a> <a class="code" href="classDecimalFormatCacheStruct_1_1DecimalFormatDeleteFunctor.html#a0">DecimalFormatDeleteFunctor</a>(MemoryManager& theManager) : |
| 00106 m_memoryManager(theManager) |
| 00107 { |
| 00108 } |
| 00109 |
| 00110 <font class="keywordtype">void</font> |
| <a name="l00111"></a><a class="code" href="classDecimalFormatCacheStruct_1_1DecimalFormatDeleteFunctor.html#a1">00111</a> <a class="code" href="classDecimalFormatCacheStruct_1_1DecimalFormatDeleteFunctor.html#a1">operator()</a>(<a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& theStruct)<font class="keyword"> const</font> |
| 00112 <font class="keyword"> </font>{ |
| 00113 assert(theStruct.m_formatter != 0); |
| 00114 |
| 00115 <a class="code" href="XalanMemoryManagement_8hpp.html#a10">XalanDestroy</a>( |
| 00116 m_memoryManager, |
| 00117 *theStruct.m_formatter); |
| 00118 } |
| 00119 |
| 00120 <font class="keyword">private</font>: |
| 00121 |
| 00122 <font class="comment">// Not implemented...</font> |
| 00123 DecimalFormatDeleteFunctor& |
| 00124 operator=(<font class="keyword">const</font> DecimalFormatDeleteFunctor&); |
| 00125 |
| 00126 <font class="comment">// Data members.</font> |
| 00127 MemoryManager& m_memoryManager; |
| 00128 }; |
| 00129 |
| <a name="l00130"></a><a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html">00130</a> <font class="keyword">struct </font>DecimalFormatFindFunctor |
| 00131 { |
| <a name="l00132"></a><a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html#a0">00132</a> <a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html#a0">DecimalFormatFindFunctor</a>(<font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>* theDFS) : |
| 00133 m_DFS(theDFS) |
| 00134 { |
| 00135 } |
| 00136 |
| 00137 <font class="keywordtype">bool</font> |
| <a name="l00138"></a><a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html#a1">00138</a> <a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html#a1">operator()</a>(<a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& theStruct)<font class="keyword"> const</font> |
| 00139 <font class="keyword"> </font>{ |
| 00140 <font class="keywordflow">return</font> theStruct.m_DFS == (*m_DFS); |
| 00141 } |
| 00142 |
| <a name="l00143"></a><a class="code" href="structDecimalFormatCacheStruct_1_1DecimalFormatFindFunctor.html#m0">00143</a> <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a> * <font class="keyword">const</font> m_DFS; |
| 00144 }; |
| 00145 |
| 00146 <font class="keyword">private</font>: |
| 00147 |
| 00148 <a class="code" href="structDecimalFormatCacheStruct.html#a0">DecimalFormatCacheStruct</a>(); |
| 00149 <a class="code" href="structDecimalFormatCacheStruct.html#a0">DecimalFormatCacheStruct</a>(<font class="keyword">const</font> <a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>& other); |
| 00150 }; |
| 00151 |
| 00152 |
| <a name="l00153"></a><a class="code" href="ICUFormatNumberFunctor_8hpp.html#a3">00153</a> <a class="code" href="XalanMemoryManagement_8hpp.html#a4">XALAN_USES_MEMORY_MANAGER</a>(<a class="code" href="structDecimalFormatCacheStruct.html">DecimalFormatCacheStruct</a>) |
| 00154 |
| 00155 <font class="comment">// Class that implements the XSLT function format-number using the ICU.</font> |
| 00156 <font class="comment">//</font> |
| 00157 <font class="keyword">class </font>XALAN_ICUBRIDGE_EXPORT ICUFormatNumberFunctor : <font class="keyword">public</font> FormatNumberFunctor |
| 00158 { |
| 00159 <font class="keyword">public</font>: |
| 00160 |
| 00161 ICUFormatNumberFunctor(MemoryManagerType& theManager); |
| 00162 |
| 00163 <font class="keyword">static</font> ICUFormatNumberFunctor* |
| 00164 create(MemoryManagerType& theManager); |
| 00165 |
| 00166 <font class="keyword">virtual</font> |
| 00167 ~ICUFormatNumberFunctor(); |
| 00168 |
| 00169 <font class="keyword">virtual</font> <font class="keywordtype">void</font> |
| 00170 operator() ( |
| 00171 <a class="code" href="classXPathExecutionContext.html">XPathExecutionContext</a>& executionContext, |
| 00172 <font class="keywordtype">double</font> theNumber, |
| 00173 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& thePattern, |
| 00174 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>* theDFS, |
| 00175 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& theResult, |
| 00176 <font class="keyword">const</font> <a class="code" href="classXalanNode.html">XalanNode</a>* context = 0, |
| 00177 <font class="keyword">const</font> LocatorType* locator = 0) <font class="keyword">const</font>; |
| 00178 |
| 00179 |
| 00180 <font class="keyword">class </font>UnlocalizePatternFunctor |
| 00181 { |
| 00182 <font class="keyword">public</font>: |
| 00183 UnlocalizePatternFunctor(<font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>& theDFS): |
| 00184 m_DFS(theDFS)<font class="keyword"></font> |
| 00185 <font class="keyword"> </font>{ |
| 00186 } |
| 00187 |
| 00188 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& |
| 00189 operator()( |
| 00190 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& thePattern, |
| 00191 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& theResult, |
| 00192 MemoryManager& theManager) <font class="keyword">const</font>; |
| 00193 |
| 00194 <font class="keyword">private</font>: |
| 00195 |
| 00196 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>& m_DFS; |
| 00197 }; |
| 00198 |
| 00199 <font class="keyword">typedef</font> <a class="code" href="classXalanList.html">XalanList<DecimalFormatCacheStruct></a> DecimalFormatCacheListType; |
| 00200 |
| 00201 <font class="keyword">private</font>: |
| 00202 |
| 00203 DecimalFormatType* |
| 00204 getCachedDecimalFormat(<font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a> &theDFS) <font class="keyword">const</font>; |
| 00205 |
| 00206 <font class="keywordtype">bool</font> |
| 00207 doFormat( |
| 00208 <font class="keywordtype">double</font> theNumber, |
| 00209 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& thePattern, |
| 00210 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& theResult, |
| 00211 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>* theDFS = 0) <font class="keyword">const</font>; |
| 00212 |
| 00213 <font class="keywordtype">bool</font> |
| 00214 doICUFormat( |
| 00215 <font class="keywordtype">double</font> theNumber, |
| 00216 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& thePattern, |
| 00217 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>& theResult, |
| 00218 DecimalFormatType* theFormatter = 0) <font class="keyword">const</font>; |
| 00219 |
| 00220 <font class="keywordtype">void</font> |
| 00221 cacheDecimalFormat( |
| 00222 DecimalFormatType* theFormatter, |
| 00223 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>& theDFS) <font class="keyword">const</font>; |
| 00224 |
| 00225 <font class="keyword">static</font> DecimalFormat* |
| 00226 createDecimalFormat( |
| 00227 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a>& theXalanDFS, |
| 00228 MemoryManager& theManager); |
| 00229 |
| 00230 <font class="keyword">static</font> DecimalFormat* |
| 00231 createDecimalFormat(MemoryManager& theManager)<font class="keyword"></font> |
| 00232 <font class="keyword"> </font>{ |
| 00233 <font class="keyword">const</font> <a class="code" href="classXalanDecimalFormatSymbols.html">XalanDecimalFormatSymbols</a> theDFS(theManager); |
| 00234 |
| 00235 <font class="keywordflow">return</font> createDecimalFormat(theDFS, theManager); |
| 00236 } |
| 00237 |
| 00238 <font class="keyword">enum</font> { eCacheMax = 10u }; |
| 00239 |
| 00240 <font class="keyword">private</font>: |
| 00241 |
| 00242 <font class="comment">// These are not implemented...</font> |
| 00243 ICUFormatNumberFunctor& |
| 00244 operator=(<font class="keyword">const</font> ICUFormatNumberFunctor&); |
| 00245 |
| 00246 <font class="keywordtype">bool</font> |
| 00247 <a class="code" href="ElemAttributeSet_8hpp.html#a1">operator==</a>(<font class="keyword">const</font> ICUFormatNumberFunctor&) <font class="keyword">const</font>; |
| 00248 |
| 00249 <font class="keyword">typedef</font> XalanMemMgrAutoPtr<DecimalFormatType> DFAutoPtrType; |
| 00250 |
| 00251 <font class="comment">// Data members...</font> |
| 00252 <font class="keyword">mutable</font> DecimalFormatCacheListType m_decimalFormatCache; |
| 00253 |
| 00254 <font class="keyword">const</font> DFAutoPtrType m_defaultDecimalFormat; |
| 00255 |
| 00256 MemoryManagerType& m_memoryManager; |
| 00257 }; |
| 00258 |
| 00259 |
| 00260 |
| 00261 XALAN_CPP_NAMESPACE_END |
| 00262 |
| 00263 |
| 00264 |
| 00265 <font class="preprocessor">#endif // FUNCTIONICUFORMATNUMBERFUNCTOR_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>
|