2 *******************************************************************************
4 * Copyright (C) 1998-1999, 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"
27 #include "unicode/udat.h"
29 struct ULocaleBundle
{
32 UNumberFormat
*fNumberFormat
;
33 UNumberFormat
*fPercentFormat
;
34 UNumberFormat
*fCurrencyFormat
;
35 UNumberFormat
*fScientificFormat
;
36 UNumberFormat
*fSpelloutFormat
;
38 UDateFormat
*fDateFormat
;
39 UDateFormat
*fTimeFormat
;
41 typedef struct ULocaleBundle ULocaleBundle
;
45 * Create a new ULocaleBundle, initializing all formatters to 0.
46 * @param loc The locale of the ULocaleBundle.
47 * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid.
50 u_locbund_new(const char *loc
);
53 * Create a deep copy of this ULocaleBundle;
54 * @param bundle The ULocaleBundle to clone.
55 * @return A new ULocaleBundle.
58 u_locbund_clone(const ULocaleBundle
*bundle
);
61 * Delete the specified ULocaleBundle, freeing all associated memory.
62 * @param bundle The ULocaleBundle to delete
65 u_locbund_delete(ULocaleBundle
*bundle
);
68 * Get the NumberFormat used to format and parse numbers in a ULocaleBundle.
69 * @param bundle The ULocaleBundle to use
70 * @return A pointer to the NumberFormat used for number formatting and parsing.
73 u_locbund_getNumberFormat(ULocaleBundle
*bundle
);
76 * Get the NumberFormat used to format and parse percents in a ULocaleBundle.
77 * @param bundle The ULocaleBundle to use
78 * @return A pointer to the NumberFormat used for percent formatting and parsing.
81 u_locbund_getPercentFormat(ULocaleBundle
*bundle
);
84 * Get the NumberFormat used to format and parse currency in a ULocaleBundle.
85 * @param bundle The ULocaleBundle to use
86 * @return A pointer to the NumberFormat used for currency formatting and parsing.
89 u_locbund_getCurrencyFormat(ULocaleBundle
*bundle
);
92 * Get the NumberFormat used to format and parse scientific numbers in a ULocaleBundle.
93 * @param bundle The ULocaleBundle to use
94 * @return A pointer to the NumberFormat used for scientific formatting and parsing.
97 u_locbund_getScientificFormat(ULocaleBundle
*bundle
);
100 * Get the NumberFormat used format to and parse spelled-out numbers in a ULocaleBundle.
101 * @param bundle The ULocaleBundle to use
102 * @return A pointer to the NumberFormat used for spelled-out number formatting and parsing.
105 u_locbund_getSpelloutFormat(ULocaleBundle
*bundle
);
108 * Get the DateFormat used to format and parse dates in a ULocaleBundle.
109 * @param bundle The ULocaleBundle to use
110 * @return A pointer to the DateFormat used for date formatting and parsing.
113 u_locbund_getDateFormat(ULocaleBundle
*bundle
);
116 * Get the DateFormat used to format and parse times in a ULocaleBundle.
117 * @param bundle The ULocaleBundle to use
118 * @return A pointer to the DateFormat used for time formatting and parsing.
121 u_locbund_getTimeFormat(ULocaleBundle
*bundle
);
123 #endif /* #if !UCONFIG_NO_FORMATTING */