ICU 58.2 58.2

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

- File List
- Globals

ulocdata.h
Go to the documentation of this file.
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 * *
6 * Copyright (C) 2003-2015, International Business Machines *
7 * Corporation and others. All Rights Reserved. *
8 * *
9 ******************************************************************************
10 * file name: ulocdata.h
11 * encoding: US-ASCII
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 2003Oct21
16 * created by: Ram Viswanadha
17 */
18
19 #ifndef __ULOCDATA_H__
20 #define __ULOCDATA_H__
21
22 #include "unicode/ures.h"
23 #include "unicode/uloc.h"
24 #include "unicode/uset.h"
25 #include "unicode/localpointer.h"
26
33 struct ULocaleData;
34
36 typedef struct ULocaleData ULocaleData;
37
38
39
43 typedef enum ULocaleDataExemplarSetType {
45 ULOCDATA_ES_STANDARD=0,
47 ULOCDATA_ES_AUXILIARY=1,
49 ULOCDATA_ES_INDEX=2,
51 ULOCDATA_ES_PUNCTUATION=3,
52 #ifndef U_HIDE_DEPRECATED_API
53
57 ULOCDATA_ES_COUNT=4
58 #endif // U_HIDE_DEPRECATED_API
59 } ULocaleDataExemplarSetType;
60
64 typedef enum ULocaleDataDelimiterType {
66 ULOCDATA_QUOTATION_START = 0,
68 ULOCDATA_QUOTATION_END = 1,
70 ULOCDATA_ALT_QUOTATION_START = 2,
72 ULOCDATA_ALT_QUOTATION_END = 3,
73 #ifndef U_HIDE_DEPRECATED_API
74
78 ULOCDATA_DELIMITER_COUNT = 4
79 #endif // U_HIDE_DEPRECATED_API
80 } ULocaleDataDelimiterType;
81
90 U_STABLE ULocaleData* U_EXPORT2
91 ulocdata_open(const char *localeID, UErrorCode *status);
92
99 U_STABLE void U_EXPORT2
100 ulocdata_close(ULocaleData *uld);
101
102 #if U_SHOW_CPLUSPLUS_API
103
104 U_NAMESPACE_BEGIN
105
115 U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDataPointer, ULocaleData, ulocdata_close);
116
117 U_NAMESPACE_END
118
119 #endif
120
132 U_STABLE void U_EXPORT2
133 ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting);
134
146 U_STABLE UBool U_EXPORT2
147 ulocdata_getNoSubstitute(ULocaleData *uld);
148
176 U_STABLE USet* U_EXPORT2
177 ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
178 uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
179
193 U_STABLE int32_t U_EXPORT2
194 ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
195
200 typedef enum UMeasurementSystem {
201 UMS_SI,
202 UMS_US,
203 UMS_UK,
204 #ifndef U_HIDE_DEPRECATED_API
205
209 UMS_LIMIT
210 #endif // U_HIDE_DEPRECATED_API
211 } UMeasurementSystem;
212
223 U_STABLE UMeasurementSystem U_EXPORT2
224 ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
225
242 U_STABLE void U_EXPORT2
243 ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
244
251 U_STABLE void U_EXPORT2
252 ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status);
253
269 U_STABLE int32_t U_EXPORT2
270 ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
271 UChar *pattern,
272 int32_t patternCapacity,
273 UErrorCode *status);
274
275
291 U_STABLE int32_t U_EXPORT2
292 ulocdata_getLocaleSeparator(ULocaleData *uld,
293 UChar *separator,
294 int32_t separatorCapacity,
295 UErrorCode *status);
296 #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:59
ULOCDATA_ALT_QUOTATION_START
Alternate quotation start.
Definition: ulocdata.h:70
ULOCDATA_QUOTATION_START
Quotation start.
Definition: ulocdata.h:66
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:51
ULOCDATA_QUOTATION_END
Quotation end.
Definition: ulocdata.h:68
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:49
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:203
UMeasurementSystem
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:200
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:64
ULOCDATA_ES_COUNT
One more than the highest normal ULocaleDataExemplarSetType value.
Definition: ulocdata.h:57
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
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:530
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:45
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:337
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
USet
struct USet USet
Definition: ucnv.h:69
ULOCDATA_ES_AUXILIARY
Auxiliary set.
Definition: ulocdata.h:47
ULOCDATA_DELIMITER_COUNT
One more than the highest normal ULocaleDataDelimiterType value.
Definition: ulocdata.h:78
UMS_LIMIT
One more than the highest normal UMeasurementSystem value.
Definition: ulocdata.h:209
LocalULocaleDataPointer
"Smart pointer" class, closes a ULocaleData via ulocdata_close().
ULocaleDataExemplarSetType
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition: ulocdata.h:43
ULOCDATA_ALT_QUOTATION_END
Alternate quotation end.
Definition: ulocdata.h:72
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
UMS_US
Measurement system followed in the United States of America.
Definition: ulocdata.h:202
ULocaleData
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:36
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:201
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:134
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:259
uloc.h
C API: Locale.