+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (c) 2002-2004, International Business Machines
+* Copyright (c) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Author: Alan Liu
#include "unicode/uenum.h"
#include "unicode/strenum.h"
-/**
- * Given a StringEnumeration, wrap it in a UEnumeration. The
- * StringEnumeration is adopted; after this call, the caller must not
- * delete it (regardless of error status).
- */
-U_CAPI UEnumeration* U_EXPORT2
-uenum_openStringEnumeration(StringEnumeration* adopted, UErrorCode* ec);
-
-/**
- * Given an array of const char* strings (invariant chars only),
- * return a UEnumeration. Must have strings[i] != 0 for i in
- * 0..count-1.
- */
-U_CAPI UEnumeration* U_EXPORT2
-uenum_openCharStringsEnumeration(const char** strings, int32_t count,
- UErrorCode* ec);
-
//----------------------------------------------------------------------
U_NAMESPACE_BEGIN
*/
virtual int32_t count(UErrorCode& status) const;
+ virtual const char* next(int32_t *resultLength, UErrorCode& status);
+
/**
* Returns the next element a UnicodeString*. If there are no
* more elements, returns NULL.
*/
static UClassID U_EXPORT2 getStaticClassID();
+ static UStringEnumeration * U_EXPORT2 fromUEnumeration(
+ UEnumeration *enumToAdopt, UErrorCode &status);
private:
UEnumeration *uenum; // owned
};