00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680) 00019 #define ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base header file. Must be first. 00024 #include <xalanc/ICUBridge/ICUBridgeDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/PlatformSupport/XalanNumberFormat.hpp> 00029 00030 00031 00032 #include <unicode/decimfmt.h> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 // Class that implements the XSLT function format-number using the ICU. 00041 // 00042 class XALAN_ICUBRIDGE_EXPORT ICUXalanNumberFormatProxy : public XalanNumberFormat 00043 { 00044 public: 00045 00046 explicit 00047 ICUXalanNumberFormatProxy(MemoryManager& theManager); 00048 00049 virtual 00050 ~ICUXalanNumberFormatProxy(); 00051 00052 virtual XalanDOMString& 00053 format( 00054 double theValue, 00055 XalanDOMString& theResult); 00056 00057 00058 virtual XalanDOMString& 00059 format( 00060 int theValue, 00061 XalanDOMString& theResult); 00062 00063 00064 virtual XalanDOMString& 00065 format( 00066 unsigned int theValue, 00067 XalanDOMString& theResult); 00068 00069 00070 virtual XalanDOMString& 00071 format( 00072 long theValue, 00073 XalanDOMString& theResult); 00074 00075 00076 virtual XalanDOMString& 00077 format( 00078 unsigned long theValue, 00079 XalanDOMString& theResult); 00080 00081 /** 00082 * Format a number into a string. 00083 * 00084 * @param theValue number to format 00085 * @param theResult the string result 00086 */ 00087 virtual XalanDOMString& 00088 format( 00089 XALAN_INT64 theValue, 00090 XalanDOMString& theResult); 00091 00092 /** 00093 * Format a number into a string. 00094 * 00095 * @param theValue number to format 00096 * @param theResult the string result 00097 */ 00098 virtual XalanDOMString& 00099 format( 00100 XALAN_UINT64 theValue, 00101 XalanDOMString& theResult); 00102 00103 virtual bool 00104 isGroupingUsed() const; 00105 00106 virtual void 00107 setGroupingUsed(bool bUsed); 00108 00109 virtual void 00110 setGroupingSize(unsigned long size); 00111 00112 virtual void 00113 setGroupingSeparator(const XalanDOMString& s); 00114 00115 private: 00116 00117 #if defined(XALAN_HAS_CPP_NAMESPACE) 00118 typedef U_ICU_NAMESPACE::DecimalFormat DecimalFormatType; 00119 #else 00120 typedef DecimalFormat* DecimalFormatType; 00121 #endif 00122 00123 DecimalFormatType* m_decimalFormat; 00124 00125 }; 00126 00127 00128 00129 XALAN_CPP_NAMESPACE_END 00130 00131 00132 00133 #endif // ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|