annotate modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/ustrenum.h @ 11038:20a8447c71c6

8207159: Update ICU to version 62.1 Reviewed-by: mbilla, kcr, ghb
author arajkumar
date Fri, 24 Aug 2018 15:06:40 +0530
parents fee4ef5c87df
children
rev   line source
arajkumar@11038 1 // © 2016 and later: Unicode, Inc. and others.
arajkumar@11038 2 // License & terms of use: http://www.unicode.org/copyright.html
ghb@10550 3 /*
ghb@10550 4 **********************************************************************
arajkumar@11038 5 * Copyright (c) 2002-2014, International Business Machines
ghb@10550 6 * Corporation and others. All Rights Reserved.
ghb@10550 7 **********************************************************************
ghb@10550 8 * Author: Alan Liu
ghb@10550 9 * Created: November 11 2002
ghb@10550 10 * Since: ICU 2.4
ghb@10550 11 **********************************************************************
ghb@10550 12 */
ghb@10550 13 #ifndef _USTRENUM_H_
ghb@10550 14 #define _USTRENUM_H_
ghb@10550 15
ghb@10550 16 #include "unicode/uenum.h"
ghb@10550 17 #include "unicode/strenum.h"
ghb@10550 18
ghb@10550 19 //----------------------------------------------------------------------
ghb@10550 20 U_NAMESPACE_BEGIN
ghb@10550 21
ghb@10550 22 /**
ghb@10550 23 * A wrapper to make a UEnumeration into a StringEnumeration. The
ghb@10550 24 * wrapper adopts the UEnumeration is wraps.
ghb@10550 25 */
ghb@10550 26 class U_COMMON_API UStringEnumeration : public StringEnumeration {
ghb@10550 27
ghb@10550 28 public:
ghb@10550 29 /**
ghb@10550 30 * Constructor. This constructor adopts its UEnumeration
ghb@10550 31 * argument.
ghb@10550 32 * @param uenum a UEnumeration object. This object takes
ghb@10550 33 * ownership of 'uenum' and will close it in its destructor. The
ghb@10550 34 * caller must not call uenum_close on 'uenum' after calling this
ghb@10550 35 * constructor.
ghb@10550 36 */
ghb@10550 37 UStringEnumeration(UEnumeration* uenum);
ghb@10550 38
ghb@10550 39 /**
ghb@10550 40 * Destructor. This closes the UEnumeration passed in to the
ghb@10550 41 * constructor.
ghb@10550 42 */
ghb@10550 43 virtual ~UStringEnumeration();
ghb@10550 44
ghb@10550 45 /**
ghb@10550 46 * Return the number of elements that the iterator traverses.
ghb@10550 47 * @param status the error code.
ghb@10550 48 * @return number of elements in the iterator.
ghb@10550 49 */
ghb@10550 50 virtual int32_t count(UErrorCode& status) const;
ghb@10550 51
ghb@10550 52 virtual const char* next(int32_t *resultLength, UErrorCode& status);
ghb@10550 53
ghb@10550 54 /**
ghb@10550 55 * Returns the next element a UnicodeString*. If there are no
ghb@10550 56 * more elements, returns NULL.
ghb@10550 57 * @param status the error code.
ghb@10550 58 * @return a pointer to the string, or NULL.
ghb@10550 59 */
ghb@10550 60 virtual const UnicodeString* snext(UErrorCode& status);
ghb@10550 61
ghb@10550 62 /**
ghb@10550 63 * Resets the iterator.
ghb@10550 64 * @param status the error code.
ghb@10550 65 */
ghb@10550 66 virtual void reset(UErrorCode& status);
ghb@10550 67
ghb@10550 68 /**
ghb@10550 69 * ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
ghb@10550 70 */
ghb@10550 71 virtual UClassID getDynamicClassID() const;
ghb@10550 72
ghb@10550 73 /**
ghb@10550 74 * ICU4C "poor man's RTTI", returns a UClassID for this ICU class.
ghb@10550 75 */
ghb@10550 76 static UClassID U_EXPORT2 getStaticClassID();
ghb@10550 77
arajkumar@11038 78 static UStringEnumeration * U_EXPORT2 fromUEnumeration(
arajkumar@11038 79 UEnumeration *enumToAdopt, UErrorCode &status);
ghb@10550 80 private:
ghb@10550 81 UEnumeration *uenum; // owned
ghb@10550 82 };
ghb@10550 83
ghb@10550 84 U_NAMESPACE_END
ghb@10550 85
ghb@10550 86 #endif
ghb@10550 87