ICU 54.1 54.1

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

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
strenum.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2002-2012, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 */
9
10 #ifndef STRENUM_H
11 #define STRENUM_H
12
13 #include "unicode/uobject.h"
14 #include "unicode/unistr.h"
15
21 U_NAMESPACE_BEGIN
22
55 class U_COMMON_API StringEnumeration : public UObject {
56 public:
61 virtual ~StringEnumeration();
62
78 virtual StringEnumeration *clone() const;
79
97 virtual int32_t count(UErrorCode& status) const = 0;
98
129 virtual const char* next(int32_t *resultLength, UErrorCode& status);
130
154 virtual const UChar* unext(int32_t *resultLength, UErrorCode& status);
155
176 virtual const UnicodeString* snext(UErrorCode& status);
177
190 virtual void reset(UErrorCode& status) = 0;
191
199 virtual UBool operator==(const StringEnumeration& that)const;
207 virtual UBool operator!=(const StringEnumeration& that)const;
208
209 protected:
214 UnicodeString unistr;
219 char charsBuffer[32];
225 char *chars;
230 int32_t charsCapacity;
231
236 StringEnumeration();
237
246 void ensureCharsCapacity(int32_t capacity, UErrorCode &status);
247
270 UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status);
271 };
272
273 U_NAMESPACE_END
274
275 /* STRENUM_H */
276 #endif