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"
26
33struct ULocaleData;
34
36typedef struct ULocaleData ULocaleData;
37
38
39
60
81
90U_STABLE ULocaleData* U_EXPORT2
91ulocdata_open(const char *localeID, UErrorCode *status);
92
99U_STABLE void U_EXPORT2
101
102#if U_SHOW_CPLUSPLUS_API
103
105
116
118
119#endif
120
132U_STABLE void U_EXPORT2
134
146U_STABLE UBool U_EXPORT2
148
176U_STABLE USet* U_EXPORT2
178 uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
179
193U_STABLE int32_t U_EXPORT2
194ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
195
200typedef enum UMeasurementSystem {
204#ifndef U_HIDE_DEPRECATED_API
210#endif /* U_HIDE_DEPRECATED_API */
212
224ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
225
242U_STABLE void U_EXPORT2
243ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
244
251U_STABLE void U_EXPORT2
253
269U_STABLE int32_t U_EXPORT2
271 UChar *pattern,
272 int32_t patternCapacity,
273 UErrorCode *status);
274
275
291U_STABLE int32_t U_EXPORT2
293 UChar *separator,
294 int32_t separatorCapacity,
295 UErrorCode *status);
296#endif
"Smart pointer" class, closes a ULocaleData via ulocdata_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
struct USet USet
Definition ucnv.h:69
C API: Locale.
void ulocdata_close(ULocaleData *uld)
Closes a locale data object.
struct ULocaleData ULocaleData
A locale data object.
Definition ulocdata.h:36
int32_t ulocdata_getLocaleSeparator(ULocaleData *uld, UChar *separator, int32_t separatorCapacity, UErrorCode *status)
Returns locale separator associated with a locale.
ULocaleDataDelimiterType
The possible types of delimiters.
Definition ulocdata.h:64
@ ULOCDATA_QUOTATION_END
Quotation end.
Definition ulocdata.h:68
@ ULOCDATA_DELIMITER_COUNT
One more than the highest normal ULocaleDataDelimiterType value.
Definition ulocdata.h:78
@ ULOCDATA_QUOTATION_START
Quotation start.
Definition ulocdata.h:66
@ ULOCDATA_ALT_QUOTATION_END
Alternate quotation end.
Definition ulocdata.h:72
@ ULOCDATA_ALT_QUOTATION_START
Alternate quotation start.
Definition ulocdata.h:70
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition ulocdata.h:200
@ UMS_UK
Mix of metric and imperial units used in Great Britain.
Definition ulocdata.h:203
@ UMS_US
Measurement system followed in the United States of America.
Definition ulocdata.h:202
@ UMS_SI
Measurement system specified by SI otherwise known as Metric system.
Definition ulocdata.h:201
@ UMS_LIMIT
One more than the highest normal UMeasurementSystem value.
Definition ulocdata.h:209
UMeasurementSystem ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status)
Returns the measurement system used in the locale specified by the localeID.
void ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting)
Sets the "no Substitute" attribute of the locale data object.
ULocaleDataExemplarSetType
The possible types of exemplar character sets.
Definition ulocdata.h:43
@ ULOCDATA_ES_COUNT
One more than the highest normal ULocaleDataExemplarSetType value.
Definition ulocdata.h:57
@ ULOCDATA_ES_STANDARD
Basic set.
Definition ulocdata.h:45
@ ULOCDATA_ES_INDEX
Index Character set.
Definition ulocdata.h:49
@ ULOCDATA_ES_AUXILIARY
Auxiliary set.
Definition ulocdata.h:47
@ ULOCDATA_ES_PUNCTUATION
Punctuation set.
Definition ulocdata.h:51
UBool ulocdata_getNoSubstitute(ULocaleData *uld)
Retrieves the current "no Substitute" value of the 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.
USet * ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn, uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status)
Returns the set of exemplar characters for a 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.
int32_t ulocdata_getLocaleDisplayPattern(ULocaleData *uld, UChar *pattern, int32_t patternCapacity, UErrorCode *status)
Returns locale display pattern associated with a locale.
void ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status)
Return the current CLDR version used by the library.
ULocaleData * ulocdata_open(const char *localeID, UErrorCode *status)
Opens a locale data object for the given locale.
int8_t UBool
The ICU boolean type.
Definition umachine.h:236
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition umachine.h:353
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition umachine.h:111
C API: Resource Bundle.
C API: Unicode Set.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:396
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
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
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137