1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/io/locbund.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 1.4 +/* 1.5 +******************************************************************************* 1.6 +* 1.7 +* Copyright (C) 1998-2011, International Business Machines 1.8 +* Corporation and others. All Rights Reserved. 1.9 +* 1.10 +******************************************************************************* 1.11 +* 1.12 +* File locbund.h 1.13 +* 1.14 +* Modification History: 1.15 +* 1.16 +* Date Name Description 1.17 +* 10/16/98 stephen Creation. 1.18 +* 02/25/99 stephen Modified for new C API. 1.19 +******************************************************************************* 1.20 +*/ 1.21 + 1.22 +#ifndef LOCBUND_H 1.23 +#define LOCBUND_H 1.24 + 1.25 +#include "unicode/utypes.h" 1.26 + 1.27 +#if !UCONFIG_NO_FORMATTING 1.28 + 1.29 +#include "unicode/unum.h" 1.30 + 1.31 +#define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT) 1.32 + 1.33 +typedef struct ULocaleBundle { 1.34 + char *fLocale; 1.35 + 1.36 + UNumberFormat *fNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT]; 1.37 + UBool isInvariantLocale; 1.38 +} ULocaleBundle; 1.39 + 1.40 + 1.41 +/** 1.42 + * Initialize a ULocaleBundle, initializing all formatters to 0. 1.43 + * @param result A ULocaleBundle to initialize. 1.44 + * @param loc The locale of the ULocaleBundle. 1.45 + * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. 1.46 + */ 1.47 +U_CAPI ULocaleBundle * 1.48 +u_locbund_init(ULocaleBundle *result, const char *loc); 1.49 + 1.50 +/** 1.51 + * Create a new ULocaleBundle, initializing all formatters to 0. 1.52 + * @param loc The locale of the ULocaleBundle. 1.53 + * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. 1.54 + */ 1.55 +/*U_CAPI ULocaleBundle * 1.56 +u_locbund_new(const char *loc);*/ 1.57 + 1.58 +/** 1.59 + * Create a deep copy of this ULocaleBundle; 1.60 + * @param bundle The ULocaleBundle to clone. 1.61 + * @return A new ULocaleBundle. 1.62 + */ 1.63 +/*U_CAPI ULocaleBundle * 1.64 +u_locbund_clone(const ULocaleBundle *bundle);*/ 1.65 + 1.66 +/** 1.67 + * Delete the specified ULocaleBundle, freeing all associated memory. 1.68 + * @param bundle The ULocaleBundle to delete 1.69 + */ 1.70 +U_CAPI void 1.71 +u_locbund_close(ULocaleBundle *bundle); 1.72 + 1.73 +/** 1.74 + * Get the NumberFormat used to format and parse numbers in a ULocaleBundle. 1.75 + * @param bundle The ULocaleBundle to use 1.76 + * @return A pointer to the NumberFormat used for number formatting and parsing. 1.77 + */ 1.78 +U_CAPI UNumberFormat * 1.79 +u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style); 1.80 + 1.81 +#endif /* #if !UCONFIG_NO_FORMATTING */ 1.82 + 1.83 +#endif