2017-01-20 00:20:31 +00:00
|
|
|
// © 2016 and later: Unicode, Inc. and others.
|
2016-06-15 18:58:17 +00:00
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
1999-08-16 21:50:52 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
2000-01-13 23:54:23 +00:00
|
|
|
*
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (C) 1998-2011, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
2000-01-13 23:54:23 +00:00
|
|
|
*
|
1999-08-16 21:50:52 +00:00
|
|
|
*******************************************************************************
|
|
|
|
*
|
|
|
|
* File locbund.h
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
*
|
|
|
|
* Date Name Description
|
|
|
|
* 10/16/98 stephen Creation.
|
|
|
|
* 02/25/99 stephen Modified for new C API.
|
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LOCBUND_H
|
|
|
|
#define LOCBUND_H
|
|
|
|
|
1999-12-28 23:39:02 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-10-01 01:26:49 +00:00
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
|
1999-12-28 23:39:02 +00:00
|
|
|
#include "unicode/unum.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-08-06 16:18:38 +00:00
|
|
|
#define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT)
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-08-06 16:18:38 +00:00
|
|
|
typedef struct ULocaleBundle {
|
|
|
|
char *fLocale;
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-08-06 16:18:38 +00:00
|
|
|
UNumberFormat *fNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT];
|
2006-08-12 09:47:38 +00:00
|
|
|
UBool isInvariantLocale;
|
2003-08-06 16:18:38 +00:00
|
|
|
} ULocaleBundle;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize a ULocaleBundle, initializing all formatters to 0.
|
|
|
|
* @param result A ULocaleBundle to initialize.
|
|
|
|
* @param loc The locale of the ULocaleBundle.
|
|
|
|
* @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid.
|
|
|
|
*/
|
2011-05-26 20:05:39 +00:00
|
|
|
U_CAPI ULocaleBundle *
|
2003-08-06 16:18:38 +00:00
|
|
|
u_locbund_init(ULocaleBundle *result, const char *loc);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new ULocaleBundle, initializing all formatters to 0.
|
|
|
|
* @param loc The locale of the ULocaleBundle.
|
|
|
|
* @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid.
|
|
|
|
*/
|
2011-05-26 20:05:39 +00:00
|
|
|
/*U_CAPI ULocaleBundle *
|
2003-08-06 16:18:38 +00:00
|
|
|
u_locbund_new(const char *loc);*/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a deep copy of this ULocaleBundle;
|
|
|
|
* @param bundle The ULocaleBundle to clone.
|
|
|
|
* @return A new ULocaleBundle.
|
|
|
|
*/
|
2011-05-26 20:05:39 +00:00
|
|
|
/*U_CAPI ULocaleBundle *
|
2003-08-06 16:18:38 +00:00
|
|
|
u_locbund_clone(const ULocaleBundle *bundle);*/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete the specified ULocaleBundle, freeing all associated memory.
|
|
|
|
* @param bundle The ULocaleBundle to delete
|
|
|
|
*/
|
2011-05-26 20:05:39 +00:00
|
|
|
U_CAPI void
|
2003-08-06 16:18:38 +00:00
|
|
|
u_locbund_close(ULocaleBundle *bundle);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the NumberFormat used to format and parse numbers in a ULocaleBundle.
|
|
|
|
* @param bundle The ULocaleBundle to use
|
|
|
|
* @return A pointer to the NumberFormat used for number formatting and parsing.
|
|
|
|
*/
|
2011-05-26 20:05:39 +00:00
|
|
|
U_CAPI UNumberFormat *
|
2003-08-06 16:18:38 +00:00
|
|
|
u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-10-01 01:26:49 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-10-01 01:26:49 +00:00
|
|
|
#endif
|