ICU 58.2 58.2

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

- File List
- Globals

uenum.h
Go to the documentation of this file.
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 *
6 * Copyright (C) 2002-2013, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 *******************************************************************************
10 * file name: uenum.h
11 * encoding: US-ASCII
12 * tab size: 8 (not used)
13 * indentation:2
14 *
15 * created on: 2002jul08
16 * created by: Vladimir Weinstein
17 */
18
19 #ifndef __UENUM_H
20 #define __UENUM_H
21
22 #include "unicode/utypes.h"
23 #include "unicode/localpointer.h"
24
25 #if U_SHOW_CPLUSPLUS_API
26 #include "unicode/strenum.h"
27 #endif
28
39 struct UEnumeration;
41 typedef struct UEnumeration UEnumeration;
42
50 U_STABLE void U_EXPORT2
51 uenum_close(UEnumeration* en);
52
53 #if U_SHOW_CPLUSPLUS_API
54
55 U_NAMESPACE_BEGIN
56
66 U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
67
68 U_NAMESPACE_END
69
70 #endif
71
86 U_STABLE int32_t U_EXPORT2
87 uenum_count(UEnumeration* en, UErrorCode* status);
88
110 U_STABLE const UChar* U_EXPORT2
111 uenum_unext(UEnumeration* en,
112 int32_t* resultLength,
113 UErrorCode* status);
114
143 U_STABLE const char* U_EXPORT2
144 uenum_next(UEnumeration* en,
145 int32_t* resultLength,
146 UErrorCode* status);
147
157 U_STABLE void U_EXPORT2
158 uenum_reset(UEnumeration* en, UErrorCode* status);
159
160 #if U_SHOW_CPLUSPLUS_API
161
171 U_STABLE UEnumeration* U_EXPORT2
172 uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec);
173
174 #endif
175
187 U_STABLE UEnumeration* U_EXPORT2
188 uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
189 UErrorCode* ec);
190
191 /* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */
192
204 U_STABLE UEnumeration* U_EXPORT2
205 uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
206 UErrorCode* ec);
207
208 #endif
uenum_close
void uenum_close(UEnumeration *en)
Disposes of resources in use by the iterator.
uenum_openUCharStringsEnumeration
UEnumeration * uenum_openUCharStringsEnumeration(const UChar *const strings[], int32_t count, UErrorCode *ec)
Given an array of const UChar* strings, return a UEnumeration.
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:41
icu::StringEnumeration
Base class for &#39;pure&#39; C++ implementations of uenum api.
Definition: strenum.h:57
uenum_next
const char * uenum_next(UEnumeration *en, int32_t *resultLength, UErrorCode *status)
Returns the next element in the iterator&#39;s list.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
uenum_unext
const UChar * uenum_unext(UEnumeration *en, int32_t *resultLength, UErrorCode *status)
Returns the next element in the iterator&#39;s list.
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:530
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
uenum_count
int32_t uenum_count(UEnumeration *en, UErrorCode *status)
Returns the number of elements that the iterator traverses.
uenum_openCharStringsEnumeration
UEnumeration * uenum_openCharStringsEnumeration(const char *const strings[], int32_t count, UErrorCode *ec)
Given an array of const char* strings (invariant chars only), return a UEnumeration.
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:337
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
strenum.h
C++ API: String Enumeration.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
LocalUEnumerationPointer
"Smart pointer" class, closes a UEnumeration via uenum_close().
uenum_reset
void uenum_reset(UEnumeration *en, UErrorCode *status)
Resets the iterator to the current list of service IDs.
uenum_openFromStringEnumeration
UEnumeration * uenum_openFromStringEnumeration(icu::StringEnumeration *adopted, UErrorCode *ec)
Given a StringEnumeration, wrap it in a UEnumeration.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:134