2 *******************************************************************************
4 * Copyright (C) 1998-2011, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
11 * Modification History:
13 * Date Name Description
14 * 10/16/98 stephen Creation.
15 * 02/25/99 stephen Modified for new C API.
16 *******************************************************************************
22 #include "unicode/utypes.h"
24 #if !UCONFIG_NO_FORMATTING
26 #include "unicode/unum.h"
28 #define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT)
30 typedef struct ULocaleBundle
{
33 UNumberFormat
*fNumberFormat
[ULOCALEBUNDLE_NUMBERFORMAT_COUNT
];
34 UBool isInvariantLocale
;
39 * Initialize a ULocaleBundle, initializing all formatters to 0.
40 * @param result A ULocaleBundle to initialize.
41 * @param loc The locale of the ULocaleBundle.
42 * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid.
44 U_CAPI ULocaleBundle
*
45 u_locbund_init(ULocaleBundle
*result
, const char *loc
);
48 * Create a new ULocaleBundle, initializing all formatters to 0.
49 * @param loc The locale of the ULocaleBundle.
50 * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid.
52 /*U_CAPI ULocaleBundle *
53 u_locbund_new(const char *loc);*/
56 * Create a deep copy of this ULocaleBundle;
57 * @param bundle The ULocaleBundle to clone.
58 * @return A new ULocaleBundle.
60 /*U_CAPI ULocaleBundle *
61 u_locbund_clone(const ULocaleBundle *bundle);*/
64 * Delete the specified ULocaleBundle, freeing all associated memory.
65 * @param bundle The ULocaleBundle to delete
68 u_locbund_close(ULocaleBundle
*bundle
);
71 * Get the NumberFormat used to format and parse numbers in a ULocaleBundle.
72 * @param bundle The ULocaleBundle to use
73 * @return A pointer to the NumberFormat used for number formatting and parsing.
75 U_CAPI UNumberFormat
*
76 u_locbund_getNumberFormat(ULocaleBundle
*bundle
, UNumberFormatStyle style
);
78 #endif /* #if !UCONFIG_NO_FORMATTING */