ICU 57.1 57.1
uenum.h
Go to the documentation of this file.
1/*
2*******************************************************************************
3*
4* Copyright (C) 2002-2013, International Business Machines
5* Corporation and others. All Rights Reserved.
6*
7*******************************************************************************
8* file name: uenum.h
9* encoding: US-ASCII
10* tab size: 8 (not used)
11* indentation:2
12*
13* created on: 2002jul08
14* created by: Vladimir Weinstein
15*/
16
17#ifndef __UENUM_H
18#define __UENUM_H
19
20#include "unicode/utypes.h"
22
23#if U_SHOW_CPLUSPLUS_API
24#include "unicode/strenum.h"
25#endif
26
31
37struct UEnumeration;
40
48U_STABLE void U_EXPORT2
50
51#if U_SHOW_CPLUSPLUS_API
52
54
65
67
68#endif
69
84U_STABLE int32_t U_EXPORT2
86
108U_STABLE const UChar* U_EXPORT2
110 int32_t* resultLength,
111 UErrorCode* status);
112
141U_STABLE const char* U_EXPORT2
143 int32_t* resultLength,
144 UErrorCode* status);
145
155U_STABLE void U_EXPORT2
157
158#if U_SHOW_CPLUSPLUS_API
159
169U_STABLE UEnumeration* U_EXPORT2
170uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec);
171
172#endif
173
185U_STABLE UEnumeration* U_EXPORT2
186uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
187 UErrorCode* ec);
188
189/* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */
190
202U_STABLE UEnumeration* U_EXPORT2
203uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
204 UErrorCode* ec);
205
206#endif
"Smart pointer" class, closes a UEnumeration via uenum_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.
C++ API: String Enumeration.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition uenum.h:39
const char * uenum_next(UEnumeration *en, int32_t *resultLength, UErrorCode *status)
Returns the next element in the iterator's list.
void uenum_reset(UEnumeration *en, UErrorCode *status)
Resets the iterator to the current list of service IDs.
UEnumeration * uenum_openFromStringEnumeration(icu::StringEnumeration *adopted, UErrorCode *ec)
Given a StringEnumeration, wrap it in a UEnumeration.
int32_t uenum_count(UEnumeration *en, UErrorCode *status)
Returns the number of elements that the iterator traverses.
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.
const UChar * uenum_unext(UEnumeration *en, int32_t *resultLength, UErrorCode *status)
Returns the next element in the iterator's list.
UEnumeration * uenum_openUCharStringsEnumeration(const UChar *const strings[], int32_t count, UErrorCode *ec)
Given an array of const UChar* strings, return a UEnumeration.
void uenum_close(UEnumeration *en)
Disposes of resources in use by the iterator.
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
Basic definitions for ICU, for both C and C++ APIs.
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
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129