ICU 67.1 67.1

unumsys.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 * Copyright (C) 2013-2014, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *****************************************************************************************
8 */
9
10 #ifndef UNUMSYS_H
11 #define UNUMSYS_H
12
13 #include "unicode/utypes.h"
14
15 #if !UCONFIG_NO_FORMATTING
16
17 #include "unicode/uenum.h"
18 #include "unicode/localpointer.h"
19
43 struct UNumberingSystem;
44 typedef struct UNumberingSystem UNumberingSystem;
57 U_STABLE UNumberingSystem * U_EXPORT2
58 unumsys_open(const char *locale, UErrorCode *status);
59
78 U_STABLE UNumberingSystem * U_EXPORT2
79 unumsys_openByName(const char *name, UErrorCode *status);
80
86 U_STABLE void U_EXPORT2
87 unumsys_close(UNumberingSystem *unumsys);
88
89 #if U_SHOW_CPLUSPLUS_API
90 U_NAMESPACE_BEGIN
91
100 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberingSystemPointer, UNumberingSystem, unumsys_close);
101
102 U_NAMESPACE_END
103 #endif
104
114 U_STABLE UEnumeration * U_EXPORT2
115 unumsys_openAvailableNames(UErrorCode *status);
116
126 U_STABLE const char * U_EXPORT2
127 unumsys_getName(const UNumberingSystem *unumsys);
128
137 U_STABLE UBool U_EXPORT2
138 unumsys_isAlgorithmic(const UNumberingSystem *unumsys);
139
148 U_STABLE int32_t U_EXPORT2
149 unumsys_getRadix(const UNumberingSystem *unumsys);
150
167 U_STABLE int32_t U_EXPORT2
168 unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result,
169 int32_t resultLength, UErrorCode *status);
170
171 #endif /* #if !UCONFIG_NO_FORMATTING */
172
173 #endif
unumsys_getName
const char * unumsys_getName(const UNumberingSystem *unumsys)
Returns the name of the specified UNumberingSystem object (if it is one of the predefined names known...
unumsys_open
UNumberingSystem * unumsys_open(const char *locale, UErrorCode *status)
Opens a UNumberingSystem object using the default numbering system for the specified locale...
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:43
unumsys_getDescription
int32_t unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result, int32_t resultLength, UErrorCode *status)
Get the description string of the specified UNumberingSystem object.
unumsys_isAlgorithmic
UBool unumsys_isAlgorithmic(const UNumberingSystem *unumsys)
Returns whether the given UNumberingSystem object is for an algorithmic (not purely positional) syste...
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:550
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
unumsys_openAvailableNames
UEnumeration * unumsys_openAvailableNames(UErrorCode *status)
Returns an enumeration over the names of all of the predefined numbering systems known to ICU...
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:376
LocalUNumberingSystemPointer
"Smart pointer" class, closes a UNumberingSystem via unumsys_close().
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
unumsys_close
void unumsys_close(UNumberingSystem *unumsys)
Close a UNumberingSystem object.
uenum.h
C API: String Enumeration.
unumsys_openByName
UNumberingSystem * unumsys_openByName(const char *name, UErrorCode *status)
Opens a UNumberingSystem object using the name of one of the predefined numbering systems specified b...
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UNumberingSystem
struct UNumberingSystem UNumberingSystem
C typedef for struct UNumberingSystem.
Definition: unumsys.h:44
unumsys_getRadix
int32_t unumsys_getRadix(const UNumberingSystem *unumsys)
Returns the radix of the specified UNumberingSystem object.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:261