ICU 64.2  64.2
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
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
Alternate quotation start.
Definition: ulocdata.h:70
Quotation start.
Definition: ulocdata.h:66
void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status)
Return the current CLDR version used by the library.
Punctuation set.
Definition: ulocdata.h:51
Quotation end.
Definition: ulocdata.h:68
void ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting)
Sets the "no Substitute" attribute of the locale data object.
Index Character set.
Definition: ulocdata.h:49
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.
Mix of metric and imperial units used in Great Britain.
Definition: ulocdata.h:203
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:200
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:64
One more than the highest normal ULocaleDataExemplarSetType value.
Definition: ulocdata.h:57
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:562
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:45
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
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
Auxiliary set.
Definition: ulocdata.h:47
One more than the highest normal ULocaleDataDelimiterType value.
Definition: ulocdata.h:78
One more than the highest normal UMeasurementSystem value.
Definition: ulocdata.h:209
"Smart pointer" class, closes a ULocaleData via ulocdata_close().
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition: ulocdata.h:43
Alternate quotation end.
Definition: ulocdata.h:72
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
struct USet USet
USet is the C API type corresponding to C++ class UnicodeSet.
Definition: uset.h:47
Measurement system followed in the United States of America.
Definition: ulocdata.h:202
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:36
ULocaleData * ulocdata_open(const char *localeID, UErrorCode *status)
Opens a locale data object for the given locale.
Measurement system specified by SI otherwise known as Metric system.
Definition: ulocdata.h:201
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:111
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225
C API: Locale.