ICU 56.1: ulocdata.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

ulocdata.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 * *
4 * Copyright (C) 2003-2015, 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
41 typedef enum ULocaleDataExemplarSetType {
43 ULOCDATA_ES_STANDARD=0,
45 ULOCDATA_ES_AUXILIARY=1,
47 ULOCDATA_ES_INDEX=2,
49 ULOCDATA_ES_PUNCTUATION=3,
51 ULOCDATA_ES_COUNT=4
52 } ULocaleDataExemplarSetType;
53
57 typedef enum ULocaleDataDelimiterType {
59 ULOCDATA_QUOTATION_START = 0,
61 ULOCDATA_QUOTATION_END = 1,
63 ULOCDATA_ALT_QUOTATION_START = 2,
65 ULOCDATA_ALT_QUOTATION_END = 3,
67 ULOCDATA_DELIMITER_COUNT = 4
68 } ULocaleDataDelimiterType;
69
78 U_STABLE ULocaleData* U_EXPORT2
79 ulocdata_open(const char *localeID, UErrorCode *status);
80
87 U_STABLE void U_EXPORT2
88 ulocdata_close(ULocaleData *uld);
89
90 #if U_SHOW_CPLUSPLUS_API
91
92 U_NAMESPACE_BEGIN
93
103 U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDataPointer, ULocaleData, ulocdata_close);
104
105 U_NAMESPACE_END
106
107 #endif
108
120 U_STABLE void U_EXPORT2
121 ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting);
122
134 U_STABLE UBool U_EXPORT2
135 ulocdata_getNoSubstitute(ULocaleData *uld);
136
164 U_STABLE USet* U_EXPORT2
165 ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
166 uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
167
181 U_STABLE int32_t U_EXPORT2
182 ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
183
188 typedef enum UMeasurementSystem {
189 UMS_SI,
190 UMS_US,
191 UMS_UK,
192 UMS_LIMIT
193 } UMeasurementSystem;
194
205 U_STABLE UMeasurementSystem U_EXPORT2
206 ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
207
224 U_STABLE void U_EXPORT2
225 ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
226
233 U_STABLE void U_EXPORT2
234 ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status);
235
251 U_STABLE int32_t U_EXPORT2
252 ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
253 UChar *pattern,
254 int32_t patternCapacity,
255 UErrorCode *status);
256
257
273 U_STABLE int32_t U_EXPORT2
274 ulocdata_getLocaleSeparator(ULocaleData *uld,
275 UChar *separator,
276 int32_t separatorCapacity,
277 UErrorCode *status);
278 #endif
UVersionInfo
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
ULOCDATA_ALT_QUOTATION_START
Alternate quotation start.
Definition: ulocdata.h:63
ULOCDATA_QUOTATION_START
Quotation start.
Definition: ulocdata.h:59
ulocdata_getCLDRVersion
void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status)
Return the current CLDR version used by the library.
ULOCDATA_ES_PUNCTUATION
Punctuation set.
Definition: ulocdata.h:49
ULOCDATA_QUOTATION_END
Quotation end.
Definition: ulocdata.h:61
ulocdata_setNoSubstitute
void ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting)
Sets the "no Substitute" attribute of the locale data object.
ULOCDATA_ES_INDEX
Index Character set.
Definition: ulocdata.h:47
ulocdata_close
void ulocdata_close(ULocaleData *uld)
Closes a locale data object.
ulocdata_getPaperSize
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.
UMS_UK
Mix of metric and imperial units used in Great Britain.
Definition: ulocdata.h:191
UMeasurementSystem
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:188
ulocdata_getLocaleSeparator
int32_t ulocdata_getLocaleSeparator(ULocaleData *uld, UChar *separator, int32_t separatorCapacity, UErrorCode *status)
Returns locale separator associated with a locale.
uset.h
C API: Unicode Set.
ulocdata_getMeasurementSystem
UMeasurementSystem ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status)
Returns the measurement system used in the locale specified by the localeID.
ULocaleDataDelimiterType
ULocaleDataDelimiterType
The possible types of delimiters.
Definition: ulocdata.h:57
ULOCDATA_ES_COUNT
One higher than the last valid type.
Definition: ulocdata.h:51
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:535
ulocdata_getLocaleDisplayPattern
int32_t ulocdata_getLocaleDisplayPattern(ULocaleData *uld, UChar *pattern, int32_t patternCapacity, UErrorCode *status)
Returns locale display pattern associated with a locale.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
ULOCDATA_ES_STANDARD
Basic set.
Definition: ulocdata.h:43
ulocdata_getExemplarSet
USet * ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn, uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status)
Returns the set of exemplar characters for a locale.
UChar
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:312
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
USet
struct USet USet
Definition: ucnv.h:67
ULOCDATA_ES_AUXILIARY
Auxiliary set.
Definition: ulocdata.h:45
ULOCDATA_DELIMITER_COUNT
One higher than the last valid type.
Definition: ulocdata.h:67
LocalULocaleDataPointer
"Smart pointer" class, closes a ULocaleData via ulocdata_close().
ULocaleDataExemplarSetType
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition: ulocdata.h:41
ULOCDATA_ALT_QUOTATION_END
Alternate quotation end.
Definition: ulocdata.h:65
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
UMS_US
Measurement system followed in the United States of America.
Definition: ulocdata.h:190
ULocaleData
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:34
ulocdata_open
ULocaleData * ulocdata_open(const char *localeID, UErrorCode *status)
Opens a locale data object for the given locale.
UMS_SI
Measurement system specified by SI otherwise known as Metric system.
Definition: ulocdata.h:189
ulocdata_getDelimiter
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.
ulocdata_getNoSubstitute
UBool ulocdata_getNoSubstitute(ULocaleData *uld)
Retrieves the current "no Substitute" value of the locale data object.
ures.h
C API: Resource Bundle.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
uloc.h
C API: Locale.