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