Xalan-C++ API Reference  1.12.0
ICUXalanNumberFormatProxy.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680)
19 #define ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
29 
30 
31 
32 #include <unicode/decimfmt.h>
33 
34 
35 
36 namespace XALAN_CPP_NAMESPACE {
37 
38 
39 
40 // Class that implements the XSLT function format-number using the ICU.
41 //
43 {
44 public:
45 
46  explicit
47  ICUXalanNumberFormatProxy(MemoryManager& theManager);
48 
49  virtual
51 
52  virtual XalanDOMString&
53  format(
54  double theValue,
55  XalanDOMString& theResult);
56 
57 
58  virtual XalanDOMString&
59  format(
60  XMLInt16 theValue,
61  XalanDOMString& theResult);
62 
63 
64  virtual XalanDOMString&
65  format(
66  XMLUInt16 theValue,
67  XalanDOMString& theResult);
68 
69 
70  virtual XalanDOMString&
71  format(
72  XMLInt32 theValue,
73  XalanDOMString& theResult);
74 
75 
76  virtual XalanDOMString&
77  format(
78  XMLUInt32 theValue,
79  XalanDOMString& theResult);
80 
81  /**
82  * Format a number into a string.
83  *
84  * @param theValue number to format
85  * @param theResult the string result
86  */
87  virtual XalanDOMString&
88  format(
89  XMLInt64 theValue,
90  XalanDOMString& theResult);
91 
92  /**
93  * Format a number into a string.
94  *
95  * @param theValue number to format
96  * @param theResult the string result
97  */
98  virtual XalanDOMString&
99  format(
100  XMLUInt64 theValue,
101  XalanDOMString& theResult);
102 
103  virtual bool
104  isGroupingUsed() const;
105 
106  virtual void
107  setGroupingUsed(bool bUsed);
108 
109  virtual void
110  setGroupingSize(unsigned long size);
111 
112  virtual void
113  setGroupingSeparator(const XalanDOMString& s);
114 
115 private:
116 
117  typedef U_ICU_NAMESPACE::DecimalFormat DecimalFormatType;
118 
119  DecimalFormatType* m_decimalFormat;
120 
121 };
122 
123 
124 
125 }
126 
127 
128 
129 #endif // ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680
XalanNumberFormat.hpp
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNumberFormat
Definition: XalanNumberFormat.hpp:36
xalanc::ICUXalanNumberFormatProxy
Definition: ICUXalanNumberFormatProxy.hpp:42
XALAN_ICUBRIDGE_EXPORT
#define XALAN_ICUBRIDGE_EXPORT
Definition: ICUBridgeDefinitions.hpp:35
ICUBridgeDefinitions.hpp
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::DecimalFormatType
U_ICU_NAMESPACE::DecimalFormat DecimalFormatType
Definition: ICUFormatNumberFunctor.hpp:53