Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


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 XALAN_CPP_NAMESPACE_BEGIN
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&
54  double theValue,
55  XalanDOMString& theResult);
56 
57 
58  virtual XalanDOMString&
60  int theValue,
61  XalanDOMString& theResult);
62 
63 
64  virtual XalanDOMString&
66  unsigned int theValue,
67  XalanDOMString& theResult);
68 
69 
70  virtual XalanDOMString&
72  long theValue,
73  XalanDOMString& theResult);
74 
75 
76  virtual XalanDOMString&
78  unsigned long 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&
89  XALAN_INT64 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&
100  XALAN_UINT64 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
114 
115 private:
116 
117 #if defined(XALAN_HAS_CPP_NAMESPACE)
118  typedef U_ICU_NAMESPACE::DecimalFormat DecimalFormatType;
119 #else
120  typedef DecimalFormat* DecimalFormatType;
121 #endif
122 
123  DecimalFormatType* m_decimalFormat;
124 
125 };
126 
127 
128 
129 XALAN_CPP_NAMESPACE_END
130 
131 
132 
133 #endif // ICUXALANNUMBERFORMATPROXY_HEADER_GUARD_1357924680
DecimalFormatType
DecimalFormat DecimalFormatType
Definition: ICUFormatNumberFunctor.hpp:56
XalanNumberFormat.hpp
ICUXalanNumberFormatProxy::setGroupingUsed
virtual void setGroupingUsed(bool bUsed)
Change whether groupings are used for numbers, for example, "234,678".
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(unsigned int theValue, XalanDOMString &theResult)
Format a number into a string.
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(XALAN_INT64 theValue, XalanDOMString &theResult)
Format a number into a string.
ICUXalanNumberFormatProxy
Definition: ICUXalanNumberFormatProxy.hpp:43
XalanNumberFormat
Definition: XalanNumberFormat.hpp:37
ICUXalanNumberFormatProxy::setGroupingSize
virtual void setGroupingSize(unsigned long size)
Change the size of groupings, for example, "234,678" uses a size of "3".
ICUXalanNumberFormatProxy::ICUXalanNumberFormatProxy
ICUXalanNumberFormatProxy(MemoryManager &theManager)
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(int theValue, XalanDOMString &theResult)
Format a number into a string.
XALAN_ICUBRIDGE_EXPORT
#define XALAN_ICUBRIDGE_EXPORT
Definition: ICUBridgeDefinitions.hpp:35
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(long theValue, XalanDOMString &theResult)
Format a number into a string.
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(XALAN_UINT64 theValue, XalanDOMString &theResult)
Format a number into a string.
ICUXalanNumberFormatProxy::setGroupingSeparator
virtual void setGroupingSeparator(const XalanDOMString &s)
Change the separator string used for groupings, for example, "234,678" uses the separator ",...
XalanDOMString
Definition: XalanDOMString.hpp:46
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(unsigned long theValue, XalanDOMString &theResult)
Format a number into a string.
XALAN_INT64
INT64 XALAN_INT64
Definition: VCPPDefinitions.hpp:66
XALAN_UINT64
UINT64 XALAN_UINT64
Definition: VCPPDefinitions.hpp:65
ICUXalanNumberFormatProxy::~ICUXalanNumberFormatProxy
virtual ~ICUXalanNumberFormatProxy()
ICUXalanNumberFormatProxy::format
virtual XalanDOMString & format(double theValue, XalanDOMString &theResult)
Format a number into a string.
ICUXalanNumberFormatProxy::isGroupingUsed
virtual bool isGroupingUsed() const
Whether groupings are used for numbers, for example, "234,678".
ICUBridgeDefinitions.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo