00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef UCHRITER_H
00011 #define UCHRITER_H
00012
00013 #include "unicode/utypes.h"
00014
00015 #if U_SHOW_CPLUSPLUS_API
00016
00017 #include "unicode/chariter.h"
00018
00024 U_NAMESPACE_BEGIN
00025
00038 class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
00039 public:
00049 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length);
00050
00064 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length,
00065 int32_t position);
00066
00083 UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length,
00084 int32_t textBegin,
00085 int32_t textEnd,
00086 int32_t position);
00087
00095 UCharCharacterIterator(const UCharCharacterIterator& that);
00096
00101 virtual ~UCharCharacterIterator();
00102
00111 UCharCharacterIterator&
00112 operator=(const UCharCharacterIterator& that);
00113
00122 virtual UBool operator==(const ForwardCharacterIterator& that) const;
00123
00129 virtual int32_t hashCode(void) const;
00130
00138 virtual UCharCharacterIterator* clone() const;
00139
00147 virtual char16_t first(void);
00148
00157 virtual char16_t firstPostInc(void);
00158
00168 virtual UChar32 first32(void);
00169
00178 virtual UChar32 first32PostInc(void);
00179
00187 virtual char16_t last(void);
00188
00196 virtual UChar32 last32(void);
00197
00206 virtual char16_t setIndex(int32_t position);
00207
00219 virtual UChar32 setIndex32(int32_t position);
00220
00226 virtual char16_t current(void) const;
00227
00233 virtual UChar32 current32(void) const;
00234
00242 virtual char16_t next(void);
00243
00252 virtual char16_t nextPostInc(void);
00253
00264 virtual UChar32 next32(void);
00265
00274 virtual UChar32 next32PostInc(void);
00275
00285 virtual UBool hasNext();
00286
00294 virtual char16_t previous(void);
00295
00303 virtual UChar32 previous32(void);
00304
00314 virtual UBool hasPrevious();
00315
00327 virtual int32_t move(int32_t delta, EOrigin origin);
00328
00340 #ifdef move32
00341
00342 #undef move32
00343 #endif
00344 virtual int32_t move32(int32_t delta, EOrigin origin);
00345
00350 void setText(ConstChar16Ptr newText, int32_t newTextLength);
00351
00359 virtual void getText(UnicodeString& result);
00360
00366 static UClassID U_EXPORT2 getStaticClassID(void);
00367
00373 virtual UClassID getDynamicClassID(void) const;
00374
00375 protected:
00380 UCharCharacterIterator();
00385 const char16_t* text;
00386
00387 };
00388
00389 U_NAMESPACE_END
00390
00391 #endif
00392
00393 #endif