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
36namespace XALAN_CPP_NAMESPACE {
37
38
39
40// Class that implements the XSLT function format-number using the ICU.
41//
43{
44public:
45
46 explicit
48
49 virtual
51
52 virtual XalanDOMString&
54 double theValue,
56
57
58 virtual XalanDOMString&
62
63
64 virtual XalanDOMString&
68
69
70 virtual XalanDOMString&
74
75
76 virtual XalanDOMString&
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&
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&
102
103 virtual bool
105
106 virtual void
108
109 virtual void
110 setGroupingSize(unsigned long size);
111
112 virtual void
114
115private:
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
#define XALAN_ICUBRIDGE_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual void setGroupingUsed(bool bUsed)
Change whether groupings are used for numbers, for example, "234,678".
virtual XalanDOMString & format(XMLUInt64 theValue, XalanDOMString &theResult)
Format a number into a string.
virtual XalanDOMString & format(double theValue, XalanDOMString &theResult)
Format a number into a string.
virtual XalanDOMString & format(XMLUInt16 theValue, XalanDOMString &theResult)
Format a number into a string.
virtual XalanDOMString & format(XMLInt64 theValue, XalanDOMString &theResult)
Format a number into a string.
virtual void setGroupingSize(unsigned long size)
Change the size of groupings, for example, "234,678" uses a size of "3".
ICUXalanNumberFormatProxy(MemoryManager &theManager)
virtual void setGroupingSeparator(const XalanDOMString &s)
Change the separator string used for groupings, for example, "234,678" uses the separator ",...
virtual XalanDOMString & format(XMLInt32 theValue, XalanDOMString &theResult)
Format a number into a string.
virtual bool isGroupingUsed() const
Whether groupings are used for numbers, for example, "234,678".
virtual XalanDOMString & format(XMLUInt32 theValue, XalanDOMString &theResult)
Format a number into a string.
virtual XalanDOMString & format(XMLInt16 theValue, XalanDOMString &theResult)
Format a number into a string.