ICU 56.1: unumsys.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

unumsys.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2013-2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *****************************************************************************************
6 */
7
8 #ifndef UNUMSYS_H
9 #define UNUMSYS_H
10
11 #include "unicode/utypes.h"
12
13 #if !UCONFIG_NO_FORMATTING
14
15 #include "unicode/uenum.h"
16 #include "unicode/localpointer.h"
17
41 struct UNumberingSystem;
42 typedef struct UNumberingSystem UNumberingSystem;
55 U_STABLE UNumberingSystem * U_EXPORT2
56 unumsys_open(const char *locale, UErrorCode *status);
57
76 U_STABLE UNumberingSystem * U_EXPORT2
77 unumsys_openByName(const char *name, UErrorCode *status);
78
84 U_STABLE void U_EXPORT2
85 unumsys_close(UNumberingSystem *unumsys);
86
87 #if U_SHOW_CPLUSPLUS_API
88 U_NAMESPACE_BEGIN
89
98 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberingSystemPointer, UNumberingSystem, unumsys_close);
99
100 U_NAMESPACE_END
101 #endif
102
111 U_STABLE UEnumeration * U_EXPORT2
112 unumsys_openAvailableNames(UErrorCode *status);
113
123 U_STABLE const char * U_EXPORT2
124 unumsys_getName(const UNumberingSystem *unumsys);
125
134 U_STABLE UBool U_EXPORT2
135 unumsys_isAlgorithmic(const UNumberingSystem *unumsys);
136
145 U_STABLE int32_t U_EXPORT2
146 unumsys_getRadix(const UNumberingSystem *unumsys);
147
164 U_STABLE int32_t U_EXPORT2
165 unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result,
166 int32_t resultLength, UErrorCode *status);
167
168 #endif /* #if !UCONFIG_NO_FORMATTING */
169
170 #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:39
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_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
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:535
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
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
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
LocalUNumberingSystemPointer
"Smart pointer" class, closes a UNumberingSystem via unumsys_close().
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
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:42
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:109
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234