00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef UCHRITER_H
00011 #define UCHRITER_H
00012
00013 #include "unicode/utypes.h"
00014 #include "unicode/chariter.h"
00015
00021 U_NAMESPACE_BEGIN
00022
00035 class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
00036 public:
00046 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length);
00047
00061 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length,
00062 int32_t position);
00063
00080 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length,
00081 int32_t textBegin,
00082 int32_t textEnd,
00083 int32_t position);
00084
00092 UCharCharacterIterator(const UCharCharacterIterator& that);
00093
00098 virtual ~UCharCharacterIterator();
00099
00108 UCharCharacterIterator&
00109 operator=(const UCharCharacterIterator& that);
00110
00119 virtual UBool operator==(const ForwardCharacterIterator& that) const;
00120
00126 virtual int32_t hashCode(void) const;
00127
00135 virtual CharacterIterator* clone(void) const;
00136
00144 virtual char16_t first(void);
00145
00154 virtual char16_t firstPostInc(void);
00155
00165 virtual UChar32 first32(void);
00166
00175 virtual UChar32 first32PostInc(void);
00176
00184 virtual char16_t last(void);
00185
00193 virtual UChar32 last32(void);
00194
00203 virtual char16_t setIndex(int32_t position);
00204
00216 virtual UChar32 setIndex32(int32_t position);
00217
00223 virtual char16_t current(void) const;
00224
00230 virtual UChar32 current32(void) const;
00231
00239 virtual char16_t next(void);
00240
00249 virtual char16_t nextPostInc(void);
00250
00261 virtual UChar32 next32(void);
00262
00271 virtual UChar32 next32PostInc(void);
00272
00282 virtual UBool hasNext();
00283
00291 virtual char16_t previous(void);
00292
00300 virtual UChar32 previous32(void);
00301
00311 virtual UBool hasPrevious();
00312
00324 virtual int32_t move(int32_t delta, EOrigin origin);
00325
00337 #ifdef move32
00338
00339 #undef move32
00340 #endif
00341 virtual int32_t move32(int32_t delta, EOrigin origin);
00342
00347 void setText(ConstChar16Ptr newText, int32_t newTextLength);
00348
00356 virtual void getText(UnicodeString& result);
00357
00363 static UClassID U_EXPORT2 getStaticClassID(void);
00364
00370 virtual UClassID getDynamicClassID(void) const;
00371
00372 protected:
00377 UCharCharacterIterator();
00382 const char16_t* text;
00383
00384 };
00385
00386 U_NAMESPACE_END
00387 #endif