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

- File List
- Globals

# strenum.h

Go to the documentation of this file.

    00001 /*
    00002 *******************************************************************************
    00003 *
    00004 *   Copyright (C) 2002-2007, International Business Machines
    00005 *   Corporation and others.  All Rights Reserved.
    00006 *
    00007 *******************************************************************************
    00008 */
    00009
    00010 #ifndef STRENUM_H
    00011 #define STRENUM_H
    00012
    00013 #include "unicode/uobject.h"
    00014 #include "unicode/unistr.h"
    00015
    00021 U_NAMESPACE_BEGIN
    00022
    00055 class U_COMMON_API StringEnumeration : public UObject {
    00056 public:
    00061     virtual ~StringEnumeration();
    00062
    00078     virtual StringEnumeration *clone() const;
    00079
    00097     virtual int32_t count(UErrorCode& status) const = 0;
    00098
    00128     virtual const char* next(int32_t *resultLength, UErrorCode& status);
    00129
    00153     virtual const UChar* unext(int32_t *resultLength, UErrorCode& status);
    00154
    00171     virtual const UnicodeString* snext(UErrorCode& status) = 0;
    00172
    00185     virtual void reset(UErrorCode& status) = 0;
    00186
    00194     virtual UBool operator==(const StringEnumeration& that)const;
    00202     virtual UBool operator!=(const StringEnumeration& that)const;
    00203
    00204 protected:
    00209     UnicodeString unistr;
    00214     char charsBuffer[32];
    00220     char *chars;
    00225     int32_t charsCapacity;
    00226
    00231     StringEnumeration();
    00232
    00241     void ensureCharsCapacity(int32_t capacity, UErrorCode &status);
    00242
    00265     UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status);
    00266 };
    00267
    00268 U_NAMESPACE_END
    00269
    00270 /* STRENUM_H */
    00271 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines