ICU 50.1.2  50.1.2
ulocdata.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 * *
4 * Copyright (C) 2003-2012, International Business Machines *
5 * Corporation and others. All Rights Reserved. *
6 * *
7 ******************************************************************************
8 * file name: ulocdata.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2003Oct21
14 * created by: Ram Viswanadha
15 */
16 
17 #ifndef __ULOCDATA_H__
18 #define __ULOCDATA_H__
19 
20 #include "unicode/ures.h"
21 #include "unicode/uloc.h"
22 #include "unicode/uset.h"
23 #include "unicode/localpointer.h"
24 
31 struct ULocaleData;
32 
34 typedef struct ULocaleData ULocaleData;
35 
36 
37 
51 
67 
76 U_STABLE ULocaleData* U_EXPORT2
77 ulocdata_open(const char *localeID, UErrorCode *status);
78 
85 U_STABLE void U_EXPORT2
87 
88 #if U_SHOW_CPLUSPLUS_API
89 
91 
102 
104 
105 #endif
106 
118 U_STABLE void U_EXPORT2
120 
132 U_STABLE UBool U_EXPORT2
134 
162 U_STABLE USet* U_EXPORT2
164  uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
165 
179 U_STABLE int32_t U_EXPORT2
180 ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
181 
186 typedef enum UMeasurementSystem {
187  UMS_SI,
191 
203 ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
204 
221 U_STABLE void U_EXPORT2
222 ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
223 
230 U_STABLE void U_EXPORT2
231 ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status);
232 
248 U_STABLE int32_t U_EXPORT2
250  UChar *pattern,
251  int32_t patternCapacity,
252  UErrorCode *status);
253 
254 
270 U_STABLE int32_t U_EXPORT2
272  UChar *separator,
273  int32_t separatorCapacity,
274  UErrorCode *status);
275 #endif
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
Definition: uversion.h:57
Alternate quotation start.
Definition: ulocdata.h:61
Quotation start.
Definition: ulocdata.h:57
void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status)
Return the current CLDR version used by the library.
Quotation end.
Definition: ulocdata.h:59
void ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting)
Sets the "no Substitute" attribute of the locale data object.
Index Character set.
Definition: ulocdata.h:47
void ulocdata_close(ULocaleData *uld)
Closes a locale data object.
void ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status)
Returns the element gives the normal business letter size, and customary units.
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:186
int32_t ulocdata_getLocaleSeparator(ULocaleData *uld, UChar *separator, int32_t separatorCapacity, UErrorCode *status)
Returns locale separator associated with a locale.
C API: Unicode Set.
UMeasurementSystem ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status)
Returns the measurement system used in the locale specified by the localeID.
ULocaleDataDelimiterType
The possible types of delimiters.
Definition: ulocdata.h:55
One higher than the last valid type.
Definition: ulocdata.h:49
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:290
int32_t ulocdata_getLocaleDisplayPattern(ULocaleData *uld, UChar *pattern, int32_t patternCapacity, UErrorCode *status)
Returns locale display pattern associated with a locale.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
Basic set.
Definition: ulocdata.h:43
USet * ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn, uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status)
Returns the set of exemplar characters for a locale.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:278
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
struct USet USet
Definition: ucnv.h:67
Auxiliary set.
Definition: ulocdata.h:45
One higher than the last valid type.
Definition: ulocdata.h:65
Measurement system followed in the United States of America.
Definition: ulocdata.h:189
"Smart pointer" class, closes a ULocaleData via ulocdata_close().
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition: ulocdata.h:41
Alternate quotation end.
Definition: ulocdata.h:63
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
Measurement system specified by SI otherwise known as Metric system.
Definition: ulocdata.h:188
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:34
ULocaleData * ulocdata_open(const char *localeID, UErrorCode *status)
Opens a locale data object for the given locale.
int32_t ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status)
Returns one of the delimiter strings associated with a locale.
UBool ulocdata_getNoSubstitute(ULocaleData *uld)
Retrieves the current "no Substitute" value of the locale data object.
C API: Resource Bundle.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
int8_t UBool
The ICU boolean type.
Definition: umachine.h:200
C API: Locale.