ICU 57.1 57.1
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"
24
31struct ULocaleData;
32
34typedef struct ULocaleData ULocaleData;
35
36
37
53
69
78U_STABLE ULocaleData* U_EXPORT2
79ulocdata_open(const char *localeID, UErrorCode *status);
80
87U_STABLE void U_EXPORT2
89
90#if U_SHOW_CPLUSPLUS_API
91
93
104
106
107#endif
108
120U_STABLE void U_EXPORT2
122
134U_STABLE UBool U_EXPORT2
136
164U_STABLE USet* U_EXPORT2
166 uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
167
181U_STABLE int32_t U_EXPORT2
182ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
183
188typedef enum UMeasurementSystem {
192 UMS_LIMIT
194
206ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
207
224U_STABLE void U_EXPORT2
225ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
226
233U_STABLE void U_EXPORT2
235
251U_STABLE int32_t U_EXPORT2
253 UChar *pattern,
254 int32_t patternCapacity,
255 UErrorCode *status);
256
257
273U_STABLE int32_t U_EXPORT2
275 UChar *separator,
276 int32_t separatorCapacity,
277 UErrorCode *status);
278#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.
Definition: localpointer.h:539
struct USet USet
Definition: ucnv.h:67
C API: Locale.
void ulocdata_close(ULocaleData *uld)
Closes a locale data object.
struct ULocaleData ULocaleData
A locale data object.
Definition: ulocdata.h:34
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:57
@ ULOCDATA_QUOTATION_END
Quotation end.
Definition: ulocdata.h:61
@ ULOCDATA_DELIMITER_COUNT
One higher than the last valid type.
Definition: ulocdata.h:67
@ ULOCDATA_QUOTATION_START
Quotation start.
Definition: ulocdata.h:59
@ ULOCDATA_ALT_QUOTATION_END
Alternate quotation end.
Definition: ulocdata.h:65
@ ULOCDATA_ALT_QUOTATION_START
Alternate quotation start.
Definition: ulocdata.h:63
UMeasurementSystem
Enumeration for representing the measurement systems.
Definition: ulocdata.h:188
@ UMS_UK
Mix of metric and imperial units used in Great Britain.
Definition: ulocdata.h:191
@ UMS_US
Measurement system followed in the United States of America.
Definition: ulocdata.h:190
@ UMS_SI
Measurement system specified by SI otherwise known as Metric system.
Definition: ulocdata.h:189
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:41
@ ULOCDATA_ES_COUNT
One higher than the last valid type.
Definition: ulocdata.h:51
@ ULOCDATA_ES_STANDARD
Basic set.
Definition: ulocdata.h:43
@ ULOCDATA_ES_INDEX
Index Character set.
Definition: ulocdata.h:47
@ ULOCDATA_ES_AUXILIARY
Auxiliary set.
Definition: ulocdata.h:45
@ ULOCDATA_ES_PUNCTUATION
Punctuation set.
Definition: ulocdata.h:49
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:234
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
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
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:476
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
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
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129