OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************** | 2 ******************************************************************************** |
3 * Copyright (C) 2005-2014, International Business Machines | 3 * Copyright (C) 2005-2015, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 * | 6 * |
7 * File WINNMFMT.H | 7 * File WINNMFMT.H |
8 * | 8 * |
9 ******************************************************************************** | 9 ******************************************************************************** |
10 */ | 10 */ |
11 | 11 |
12 #ifndef __WINNMFMT | 12 #ifndef __WINNMFMT |
13 #define __WINNMFMT | 13 #define __WINNMFMT |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 * @param appendTo Output parameter to receive result. | 82 * @param appendTo Output parameter to receive result. |
83 * Result is appended to existing contents. | 83 * Result is appended to existing contents. |
84 * @param pos On input: an alignment field, if desired. | 84 * @param pos On input: an alignment field, if desired. |
85 * On output: the offsets of the alignment field. | 85 * On output: the offsets of the alignment field. |
86 * @return Reference to 'appendTo' parameter. | 86 * @return Reference to 'appendTo' parameter. |
87 */ | 87 */ |
88 virtual UnicodeString& format(int64_t number, | 88 virtual UnicodeString& format(int64_t number, |
89 UnicodeString& appendTo, | 89 UnicodeString& appendTo, |
90 FieldPosition& pos) const; | 90 FieldPosition& pos) const; |
91 | 91 |
| 92 using NumberFormat::format; |
| 93 |
92 // Use the default behavior for the following. | 94 // Use the default behavior for the following. |
93 // virtual UnicodeString &format(double number, UnicodeString &appendTo) cons
t; | 95 // virtual UnicodeString &format(double number, UnicodeString &appendTo) cons
t; |
94 // virtual UnicodeString &format(int32_t number, UnicodeString &appendTo) con
st; | 96 // virtual UnicodeString &format(int32_t number, UnicodeString &appendTo) con
st; |
95 // virtual UnicodeString &format(int64_t number, UnicodeString &appendTo) con
st; | 97 // virtual UnicodeString &format(int64_t number, UnicodeString &appendTo) con
st; |
96 | 98 |
97 virtual void parse(const UnicodeString& text, Formattable& result, ParsePosi
tion& parsePosition) const; | 99 virtual void parse(const UnicodeString& text, Formattable& result, ParsePosi
tion& parsePosition) const; |
98 | 100 |
99 /** | 101 /** |
100 * Sets the maximum number of digits allowed in the fraction portion of a | 102 * Sets the maximum number of digits allowed in the fraction portion of a |
101 * number. maximumFractionDigits must be >= minimumFractionDigits. If the | 103 * number. maximumFractionDigits must be >= minimumFractionDigits. If the |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 * compilers support genuine RTTI. Polymorphic operator==() and clone() | 138 * compilers support genuine RTTI. Polymorphic operator==() and clone() |
137 * methods call this method. | 139 * methods call this method. |
138 * | 140 * |
139 * @return The class ID for this object. All objects of a | 141 * @return The class ID for this object. All objects of a |
140 * given class have the same class ID. Objects of | 142 * given class have the same class ID. Objects of |
141 * other classes have different class IDs. | 143 * other classes have different class IDs. |
142 */ | 144 */ |
143 virtual UClassID getDynamicClassID(void) const; | 145 virtual UClassID getDynamicClassID(void) const; |
144 | 146 |
145 private: | 147 private: |
146 UnicodeString &variadicFormat(int32_t numDigits, UnicodeString &appendTo, co
nst wchar_t *format, ...) const; | 148 UnicodeString &format(int32_t numDigits, UnicodeString &appendTo, const wcha
r_t *format, ...) const; |
147 | 149 |
148 UBool fCurrency; | 150 UBool fCurrency; |
149 Locale fLocale; | 151 Locale fLocale; |
150 int32_t fLCID; | 152 int32_t fLCID; |
151 FormatInfo *fFormatInfo; | 153 FormatInfo *fFormatInfo; |
152 UBool fFractionDigitsSet; | 154 UBool fFractionDigitsSet; |
153 | 155 |
154 }; | 156 }; |
155 | 157 |
156 U_NAMESPACE_END | 158 U_NAMESPACE_END |
157 | 159 |
158 #endif /* #if !UCONFIG_NO_FORMATTING */ | 160 #endif /* #if !UCONFIG_NO_FORMATTING */ |
159 | 161 |
160 #endif // U_PLATFORM_USES_ONLY_WIN32_API | 162 #endif // U_PLATFORM_USES_ONLY_WIN32_API |
161 | 163 |
162 #endif // __WINNMFMT | 164 #endif // __WINNMFMT |
OLD | NEW |