2
**********************************************************************
3
* Copyright (c) 2002-2009, International Business Machines
4
* Corporation and others. All Rights Reserved.
5
**********************************************************************
7
* Created: November 11 2002
9
**********************************************************************
14
#include "unicode/uenum.h"
15
#include "unicode/strenum.h"
18
* Given an array of const char* strings (invariant chars only),
19
* return a UEnumeration. Must have strings[i] != 0 for i in
22
U_CAPI UEnumeration* U_EXPORT2
23
uenum_openCharStringsEnumeration(const char* const* strings, int32_t count,
26
//----------------------------------------------------------------------
30
* A wrapper to make a UEnumeration into a StringEnumeration. The
31
* wrapper adopts the UEnumeration is wraps.
33
class U_COMMON_API UStringEnumeration : public StringEnumeration {
37
* Constructor. This constructor adopts its UEnumeration
39
* @param uenum a UEnumeration object. This object takes
40
* ownership of 'uenum' and will close it in its destructor. The
41
* caller must not call uenum_close on 'uenum' after calling this
44
UStringEnumeration(UEnumeration* uenum);
47
* Destructor. This closes the UEnumeration passed in to the
50
virtual ~UStringEnumeration();
53
* Return the number of elements that the iterator traverses.
54
* @param status the error code.
55
* @return number of elements in the iterator.
57
virtual int32_t count(UErrorCode& status) const;
60
* Returns the next element a UnicodeString*. If there are no
61
* more elements, returns NULL.
62
* @param status the error code.
63
* @return a pointer to the string, or NULL.
65
virtual const UnicodeString* snext(UErrorCode& status);
68
* Resets the iterator.
69
* @param status the error code.
71
virtual void reset(UErrorCode& status);
74
* ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
76
virtual UClassID getDynamicClassID() const;
79
* ICU4C "poor man's RTTI", returns a UClassID for this ICU class.
81
static UClassID U_EXPORT2 getStaticClassID();
84
UEnumeration *uenum; // owned