michael@0: /* michael@0: ******************************************************************************* michael@0: * michael@0: * Copyright (C) 1998-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: * michael@0: ******************************************************************************* michael@0: * michael@0: * File locbund.h michael@0: * michael@0: * Modification History: michael@0: * michael@0: * Date Name Description michael@0: * 10/16/98 stephen Creation. michael@0: * 02/25/99 stephen Modified for new C API. michael@0: ******************************************************************************* michael@0: */ michael@0: michael@0: #ifndef LOCBUND_H michael@0: #define LOCBUND_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/unum.h" michael@0: michael@0: #define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT) michael@0: michael@0: typedef struct ULocaleBundle { michael@0: char *fLocale; michael@0: michael@0: UNumberFormat *fNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT]; michael@0: UBool isInvariantLocale; michael@0: } ULocaleBundle; michael@0: michael@0: michael@0: /** michael@0: * Initialize a ULocaleBundle, initializing all formatters to 0. michael@0: * @param result A ULocaleBundle to initialize. michael@0: * @param loc The locale of the ULocaleBundle. michael@0: * @return A pointer to a ULocaleBundle, or 0 if loc was invalid. michael@0: */ michael@0: U_CAPI ULocaleBundle * michael@0: u_locbund_init(ULocaleBundle *result, const char *loc); michael@0: michael@0: /** michael@0: * Create a new ULocaleBundle, initializing all formatters to 0. michael@0: * @param loc The locale of the ULocaleBundle. michael@0: * @return A pointer to a ULocaleBundle, or 0 if loc was invalid. michael@0: */ michael@0: /*U_CAPI ULocaleBundle * michael@0: u_locbund_new(const char *loc);*/ michael@0: michael@0: /** michael@0: * Create a deep copy of this ULocaleBundle; michael@0: * @param bundle The ULocaleBundle to clone. michael@0: * @return A new ULocaleBundle. michael@0: */ michael@0: /*U_CAPI ULocaleBundle * michael@0: u_locbund_clone(const ULocaleBundle *bundle);*/ michael@0: michael@0: /** michael@0: * Delete the specified ULocaleBundle, freeing all associated memory. michael@0: * @param bundle The ULocaleBundle to delete michael@0: */ michael@0: U_CAPI void michael@0: u_locbund_close(ULocaleBundle *bundle); michael@0: michael@0: /** michael@0: * Get the NumberFormat used to format and parse numbers in a ULocaleBundle. michael@0: * @param bundle The ULocaleBundle to use michael@0: * @return A pointer to the NumberFormat used for number formatting and parsing. michael@0: */ michael@0: U_CAPI UNumberFormat * michael@0: u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style); michael@0: michael@0: #endif /* #if !UCONFIG_NO_FORMATTING */ michael@0: michael@0: #endif