OLD | NEW |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 2016 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html | 2 // License & terms of use: http://www.unicode.org/copyright.html |
3 /* | 3 /* |
4 ******************************************************************************** | 4 ******************************************************************************** |
5 * Copyright (C) 1997-2016, International Business Machines | 5 * Copyright (C) 1997-2016, International Business Machines |
6 * Corporation and others. All Rights Reserved. | 6 * Corporation and others. All Rights Reserved. |
7 ******************************************************************************** | 7 ******************************************************************************** |
8 * | 8 * |
9 * File DCFMTSYM.H | 9 * File DCFMTSYM.H |
10 * | 10 * |
(...skipping 16 matching lines...) Expand all Loading... |
27 #ifndef DCFMTSYM_H | 27 #ifndef DCFMTSYM_H |
28 #define DCFMTSYM_H | 28 #define DCFMTSYM_H |
29 | 29 |
30 #include "unicode/utypes.h" | 30 #include "unicode/utypes.h" |
31 #include "unicode/uchar.h" | 31 #include "unicode/uchar.h" |
32 | 32 |
33 #if !UCONFIG_NO_FORMATTING | 33 #if !UCONFIG_NO_FORMATTING |
34 | 34 |
35 #include "unicode/uobject.h" | 35 #include "unicode/uobject.h" |
36 #include "unicode/locid.h" | 36 #include "unicode/locid.h" |
| 37 #include "unicode/numsys.h" |
37 #include "unicode/unum.h" | 38 #include "unicode/unum.h" |
38 #include "unicode/unistr.h" | 39 #include "unicode/unistr.h" |
39 | 40 |
40 /** | 41 /** |
41 * \file | 42 * \file |
42 * \brief C++ API: Symbols for formatting numbers. | 43 * \brief C++ API: Symbols for formatting numbers. |
43 */ | 44 */ |
44 | 45 |
45 | 46 |
46 U_NAMESPACE_BEGIN | 47 U_NAMESPACE_BEGIN |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 * Create a DecimalFormatSymbols object for the given locale. | 179 * Create a DecimalFormatSymbols object for the given locale. |
179 * | 180 * |
180 * @param locale The locale to get symbols for. | 181 * @param locale The locale to get symbols for. |
181 * @param status Input/output parameter, set to success or | 182 * @param status Input/output parameter, set to success or |
182 * failure code upon return. | 183 * failure code upon return. |
183 * @stable ICU 2.0 | 184 * @stable ICU 2.0 |
184 */ | 185 */ |
185 DecimalFormatSymbols(const Locale& locale, UErrorCode& status); | 186 DecimalFormatSymbols(const Locale& locale, UErrorCode& status); |
186 | 187 |
187 /** | 188 /** |
| 189 * Creates a DecimalFormatSymbols instance for the given locale with digits
and symbols |
| 190 * corresponding to the given NumberingSystem. |
| 191 * |
| 192 * This constructor behaves equivalently to the normal constructor called wi
th a locale having a |
| 193 * "numbers=xxxx" keyword specifying the numbering system by name. |
| 194 * |
| 195 * In this constructor, the NumberingSystem argument will be used even if th
e locale has its own |
| 196 * "numbers=xxxx" keyword. |
| 197 * |
| 198 * @param locale The locale to get symbols for. |
| 199 * @param ns The numbering system. |
| 200 * @param status Input/output parameter, set to success or |
| 201 * failure code upon return. |
| 202 * @draft ICU 60 |
| 203 */ |
| 204 DecimalFormatSymbols(const Locale& locale, const NumberingSystem& ns, UError
Code& status); |
| 205 |
| 206 /** |
188 * Create a DecimalFormatSymbols object for the default locale. | 207 * Create a DecimalFormatSymbols object for the default locale. |
189 * This constructor will not fail. If the resource file data is | 208 * This constructor will not fail. If the resource file data is |
190 * not available, it will use hard-coded last-resort data and | 209 * not available, it will use hard-coded last-resort data and |
191 * set status to U_USING_FALLBACK_ERROR. | 210 * set status to U_USING_FALLBACK_ERROR. |
192 * | 211 * |
193 * @param status Input/output parameter, set to success or | 212 * @param status Input/output parameter, set to success or |
194 * failure code upon return. | 213 * failure code upon return. |
195 * @stable ICU 2.0 | 214 * @stable ICU 2.0 |
196 */ | 215 */ |
197 DecimalFormatSymbols(UErrorCode& status); | 216 DecimalFormatSymbols(UErrorCode& status); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 358 |
340 /** | 359 /** |
341 * Initializes the symbols from the LocaleElements resource bundle. | 360 * Initializes the symbols from the LocaleElements resource bundle. |
342 * Note: The organization of LocaleElements badly needs to be | 361 * Note: The organization of LocaleElements badly needs to be |
343 * cleaned up. | 362 * cleaned up. |
344 * | 363 * |
345 * @param locale The locale to get symbols for. | 364 * @param locale The locale to get symbols for. |
346 * @param success Input/output parameter, set to success or | 365 * @param success Input/output parameter, set to success or |
347 * failure code upon return. | 366 * failure code upon return. |
348 * @param useLastResortData determine if use last resort data | 367 * @param useLastResortData determine if use last resort data |
| 368 * @param ns The NumberingSystem to use; otherwise, fall |
| 369 * back to the locale. |
349 */ | 370 */ |
350 void initialize(const Locale& locale, UErrorCode& success, UBool useLastReso
rtData = FALSE); | 371 void initialize(const Locale& locale, UErrorCode& success, |
| 372 UBool useLastResortData = FALSE, const NumberingSystem* ns = nullptr); |
351 | 373 |
352 /** | 374 /** |
353 * Initialize the symbols with default values. | 375 * Initialize the symbols with default values. |
354 */ | 376 */ |
355 void initialize(); | 377 void initialize(); |
356 | 378 |
357 void setCurrencyForSymbols(); | 379 void setCurrencyForSymbols(); |
358 | 380 |
359 public: | 381 public: |
360 | 382 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 return currPattern; | 519 return currPattern; |
498 } | 520 } |
499 #endif /* U_HIDE_INTERNAL_API */ | 521 #endif /* U_HIDE_INTERNAL_API */ |
500 | 522 |
501 U_NAMESPACE_END | 523 U_NAMESPACE_END |
502 | 524 |
503 #endif /* #if !UCONFIG_NO_FORMATTING */ | 525 #endif /* #if !UCONFIG_NO_FORMATTING */ |
504 | 526 |
505 #endif // _DCFMTSYM | 527 #endif // _DCFMTSYM |
506 //eof | 528 //eof |
OLD | NEW |