]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
374ca955 A |
3 | /* |
4 | ******************************************************************************* | |
5 | * | |
4388f060 | 6 | * Copyright (C) 1998-2011, International Business Machines |
374ca955 A |
7 | * Corporation and others. All Rights Reserved. |
8 | * | |
9 | ******************************************************************************* | |
10 | * | |
11 | * File locbund.h | |
12 | * | |
13 | * Modification History: | |
14 | * | |
15 | * Date Name Description | |
16 | * 10/16/98 stephen Creation. | |
17 | * 02/25/99 stephen Modified for new C API. | |
18 | ******************************************************************************* | |
19 | */ | |
20 | ||
21 | #ifndef LOCBUND_H | |
22 | #define LOCBUND_H | |
23 | ||
24 | #include "unicode/utypes.h" | |
25 | ||
26 | #if !UCONFIG_NO_FORMATTING | |
27 | ||
28 | #include "unicode/unum.h" | |
29 | ||
30 | #define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT) | |
31 | ||
32 | typedef struct ULocaleBundle { | |
33 | char *fLocale; | |
34 | ||
35 | UNumberFormat *fNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT]; | |
73c04bcf | 36 | UBool isInvariantLocale; |
374ca955 A |
37 | } ULocaleBundle; |
38 | ||
39 | ||
40 | /** | |
41 | * Initialize a ULocaleBundle, initializing all formatters to 0. | |
42 | * @param result A ULocaleBundle to initialize. | |
43 | * @param loc The locale of the ULocaleBundle. | |
44 | * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. | |
45 | */ | |
4388f060 | 46 | U_CAPI ULocaleBundle * |
374ca955 A |
47 | u_locbund_init(ULocaleBundle *result, const char *loc); |
48 | ||
49 | /** | |
50 | * Create a new ULocaleBundle, initializing all formatters to 0. | |
51 | * @param loc The locale of the ULocaleBundle. | |
52 | * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. | |
53 | */ | |
4388f060 | 54 | /*U_CAPI ULocaleBundle * |
374ca955 A |
55 | u_locbund_new(const char *loc);*/ |
56 | ||
57 | /** | |
58 | * Create a deep copy of this ULocaleBundle; | |
59 | * @param bundle The ULocaleBundle to clone. | |
60 | * @return A new ULocaleBundle. | |
61 | */ | |
4388f060 | 62 | /*U_CAPI ULocaleBundle * |
374ca955 A |
63 | u_locbund_clone(const ULocaleBundle *bundle);*/ |
64 | ||
65 | /** | |
66 | * Delete the specified ULocaleBundle, freeing all associated memory. | |
67 | * @param bundle The ULocaleBundle to delete | |
68 | */ | |
4388f060 | 69 | U_CAPI void |
374ca955 A |
70 | u_locbund_close(ULocaleBundle *bundle); |
71 | ||
72 | /** | |
73 | * Get the NumberFormat used to format and parse numbers in a ULocaleBundle. | |
74 | * @param bundle The ULocaleBundle to use | |
75 | * @return A pointer to the NumberFormat used for number formatting and parsing. | |
76 | */ | |
4388f060 | 77 | U_CAPI UNumberFormat * |
374ca955 A |
78 | u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style); |
79 | ||
80 | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
81 | ||
82 | #endif |