strenum.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 2002-2005, 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 
00187 protected:
00192     UnicodeString unistr;
00197     char charsBuffer[32];
00203     char *chars;
00208     int32_t charsCapacity;
00209 
00214     StringEnumeration();
00215 
00224     void ensureCharsCapacity(int32_t capacity, UErrorCode &status);
00225 
00248     UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status);
00249 };
00250 
00251 U_NAMESPACE_END
00252 
00253 /* STRENUM_H */
00254 #endif

Generated on Mon Mar 24 16:24:20 2008 for ICU 3.4.1 by  doxygen 1.4.7