1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
6 * Copyright (C) 1998-2011, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 *******************************************************************************
13 * Modification History:
15 * Date Name Description
16 * 10/16/98 stephen Creation.
17 * 02/25/99 stephen Modified for new C API.
18 *******************************************************************************
24 #include "unicode/utypes.h"
26 #if !UCONFIG_NO_FORMATTING
28 #include "unicode/unum.h"
30 #define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT)
32 typedef struct ULocaleBundle
{
35 UNumberFormat
*fNumberFormat
[ULOCALEBUNDLE_NUMBERFORMAT_COUNT
];
36 UBool isInvariantLocale
;
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.
46 U_CAPI ULocaleBundle
*
47 u_locbund_init(ULocaleBundle
*result
, const char *loc
);
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.
54 /*U_CAPI ULocaleBundle *
55 u_locbund_new(const char *loc);*/
58 * Create a deep copy of this ULocaleBundle;
59 * @param bundle The ULocaleBundle to clone.
60 * @return A new ULocaleBundle.
62 /*U_CAPI ULocaleBundle *
63 u_locbund_clone(const ULocaleBundle *bundle);*/
66 * Delete the specified ULocaleBundle, freeing all associated memory.
67 * @param bundle The ULocaleBundle to delete
70 u_locbund_close(ULocaleBundle
*bundle
);
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.
77 U_CAPI UNumberFormat
*
78 u_locbund_getNumberFormat(ULocaleBundle
*bundle
, UNumberFormatStyle style
);
80 #endif /* #if !UCONFIG_NO_FORMATTING */