ICU 62.1  62.1
ulocdata.h
Go to the documentation of this file.
1 // © 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: UTF-8
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 
52 #ifndef U_HIDE_DEPRECATED_API
53 
58 #endif /* U_HIDE_DEPRECATED_API */
60 
73 #ifndef U_HIDE_DEPRECATED_API
74 
79 #endif /* U_HIDE_DEPRECATED_API */
81 
90 U_STABLE ULocaleData* U_EXPORT2
91 ulocdata_open(const char *localeID, UErrorCode *status);
92 
99 U_STABLE void U_EXPORT2
101 
102 #if U_SHOW_CPLUSPLUS_API
103 
105 
116 
118 
119 #endif
120 
132 U_STABLE void U_EXPORT2
134 
146 U_STABLE UBool U_EXPORT2
148 
176 U_STABLE USet* U_EXPORT2
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 {
204 #ifndef U_HIDE_DEPRECATED_API
205 
210 #endif /* U_HIDE_DEPRECATED_API */
212 
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
271  UChar *pattern,
272  int32_t patternCapacity,
273  UErrorCode *status);
274 
275 
291 U_STABLE int32_t U_EXPORT2
293  UChar *separator,
294  int32_t separatorCapacity,
295  UErrorCode *status);
296 #endif
ulocdata_setNoSubstitute
void ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting)
Sets the "no Substitute" attribute of the locale data object.
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.
ulocdata_getMeasurementSystem
UMeasurementSystem ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status)
Returns the measurement system used in the locale specified by the localeID.
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:236
ULOCDATA_DELIMITER_COUNT
@ ULOCDATA_DELIMITER_COUNT
One more than the highest normal ULocaleDataDelimiterType value.
Definition: ulocdata.h:78
ULOCDATA_QUOTATION_START
@ ULOCDATA_QUOTATION_START
Quotation start.
Definition: ulocdata.h:66
UMS_UK
@ UMS_UK
Mix of metric and imperial units used in Great Britain.
Definition: ulocdata.h:203
ULOCDATA_ES_INDEX
@ ULOCDATA_ES_INDEX
Index Character set.
Definition: ulocdata.h:49
ures.h
C API: Resource Bundle.
uloc.h
C API: Locale.
ULocaleDataExemplarSetType
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition: ulocdata.h:43
ulocdata_close
void ulocdata_close(ULocaleData *uld)
Closes a locale data object.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition: utypes.h:396
ULOCDATA_ES_STANDARD
@ ULOCDATA_ES_STANDARD
Basic set.
Definition: ulocdata.h:45
ULOCDATA_QUOTATION_END
@ ULOCDATA_QUOTATION_END
Quotation end.
Definition: ulocdata.h:68
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_ES_COUNT
@ ULOCDATA_ES_COUNT
One more than the highest normal ULocaleDataExemplarSetType value.
Definition: ulocdata.h:57
UMeasurementSystem
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:200
ULocaleDataDelimiterType
ULocaleDataDelimiterType
The possible types of delimiters.
Definition: ulocdata.h:64
UMS_US
@ UMS_US
Measurement system followed in the United States of America.
Definition: ulocdata.h:202
UMS_LIMIT
@ UMS_LIMIT
One more than the highest normal UMeasurementSystem value.
Definition: ulocdata.h:209
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
Definition: localpointer.h:487
ULOCDATA_ES_PUNCTUATION
@ ULOCDATA_ES_PUNCTUATION
Punctuation set.
Definition: ulocdata.h:51
ulocdata_getLocaleDisplayPattern
int32_t ulocdata_getLocaleDisplayPattern(ULocaleData *uld, UChar *pattern, int32_t patternCapacity, UErrorCode *status)
Returns locale display pattern associated with a locale.
ulocdata_open
ULocaleData * ulocdata_open(const char *localeID, UErrorCode *status)
Opens a locale data object for the given locale.
ulocdata_getCLDRVersion
void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status)
Return the current CLDR version used by the library.
uset.h
C API: Unicode Set.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UMS_SI
@ UMS_SI
Measurement system specified by SI otherwise known as Metric system.
Definition: ulocdata.h:201
LocalULocaleDataPointer
ulocdata_getLocaleSeparator
int32_t ulocdata_getLocaleSeparator(ULocaleData *uld, UChar *separator, int32_t separatorCapacity, UErrorCode *status)
Returns locale separator associated with a locale.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
ULOCDATA_ES_AUXILIARY
@ ULOCDATA_ES_AUXILIARY
Auxiliary set.
Definition: ulocdata.h:47
ULOCDATA_ALT_QUOTATION_END
@ ULOCDATA_ALT_QUOTATION_END
Alternate quotation end.
Definition: ulocdata.h:72
UChar
uint16_t UChar
Definition: umachine.h:353
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
USet
struct USet USet
Definition: ucnv.h:69
ULocaleData
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:36
U_NAMESPACE_END
#define U_NAMESPACE_END
Definition: uversion.h:138
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
Definition: uversion.h:137
ULOCDATA_ALT_QUOTATION_START
@ ULOCDATA_ALT_QUOTATION_START
Alternate quotation start.
Definition: ulocdata.h:70
ulocdata_getNoSubstitute
UBool ulocdata_getNoSubstitute(ULocaleData *uld)
Retrieves the current "no Substitute" value of the 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.