00001
00002
00003
00004
00005
00006
00007
00008 #ifndef UCHRITER_H
00009 #define UCHRITER_H
00010
00011 #include "unicode/utypes.h"
00012 #include "unicode/chariter.h"
00013
00019 U_NAMESPACE_BEGIN
00020
00033 class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
00034 public:
00044 UCharCharacterIterator(const UChar* textPtr, int32_t length);
00045
00059 UCharCharacterIterator(const UChar* textPtr, int32_t length,
00060 int32_t position);
00061
00078 UCharCharacterIterator(const UChar* textPtr, int32_t length,
00079 int32_t textBegin,
00080 int32_t textEnd,
00081 int32_t position);
00082
00090 UCharCharacterIterator(const UCharCharacterIterator& that);
00091
00096 virtual ~UCharCharacterIterator();
00097
00106 UCharCharacterIterator&
00107 operator=(const UCharCharacterIterator& that);
00108
00117 virtual UBool operator==(const ForwardCharacterIterator& that) const;
00118
00124 virtual int32_t hashCode(void) const;
00125
00133 virtual CharacterIterator* clone(void) const;
00134
00142 virtual UChar first(void);
00143
00152 virtual UChar firstPostInc(void);
00153
00163 virtual UChar32 first32(void);
00164
00173 virtual UChar32 first32PostInc(void);
00174
00182 virtual UChar last(void);
00183
00191 virtual UChar32 last32(void);
00192
00201 virtual UChar setIndex(int32_t position);
00202
00214 virtual UChar32 setIndex32(int32_t position);
00215
00221 virtual UChar current(void) const;
00222
00228 virtual UChar32 current32(void) const;
00229
00237 virtual UChar next(void);
00238
00247 virtual UChar nextPostInc(void);
00248
00259 virtual UChar32 next32(void);
00260
00269 virtual UChar32 next32PostInc(void);
00270
00280 virtual UBool hasNext();
00281
00289 virtual UChar previous(void);
00290
00298 virtual UChar32 previous32(void);
00299
00309 virtual UBool hasPrevious();
00310
00322 virtual int32_t move(int32_t delta, EOrigin origin);
00323
00335 virtual int32_t move32(int32_t delta, EOrigin origin);
00336
00341 void setText(const UChar* newText, int32_t newTextLength);
00342
00350 virtual void getText(UnicodeString& result);
00351
00357 static UClassID U_EXPORT2 getStaticClassID(void);
00358
00364 virtual UClassID getDynamicClassID(void) const;
00365
00366 protected:
00371 UCharCharacterIterator();
00376 const UChar* text;
00377
00378 };
00379
00380 U_NAMESPACE_END
00381 #endif