|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ********************************************************************** 00005 * Copyright (C) 1998-2005, International Business Machines 00006 * Corporation and others. All Rights Reserved. 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 bool operator==(const ForwardCharacterIterator& that) const override; 00123 00129 virtual int32_t hashCode(void) const override; 00130 00138 virtual UCharCharacterIterator* clone() const override; 00139 00147 virtual char16_t first(void) override; 00148 00157 virtual char16_t firstPostInc(void) override; 00158 00168 virtual UChar32 first32(void) override; 00169 00178 virtual UChar32 first32PostInc(void) override; 00179 00187 virtual char16_t last(void) override; 00188 00196 virtual UChar32 last32(void) override; 00197 00206 virtual char16_t setIndex(int32_t position) override; 00207 00219 virtual UChar32 setIndex32(int32_t position) override; 00220 00226 virtual char16_t current(void) const override; 00227 00233 virtual UChar32 current32(void) const override; 00234 00242 virtual char16_t next(void) override; 00243 00252 virtual char16_t nextPostInc(void) override; 00253 00264 virtual UChar32 next32(void) override; 00265 00274 virtual UChar32 next32PostInc(void) override; 00275 00285 virtual UBool hasNext() override; 00286 00294 virtual char16_t previous(void) override; 00295 00303 virtual UChar32 previous32(void) override; 00304 00314 virtual UBool hasPrevious() override; 00315 00327 virtual int32_t move(int32_t delta, EOrigin origin) override; 00328 00340 #ifdef move32 00341 // One of the system headers right now is sometimes defining a conflicting macro we don't use 00342 #undef move32 00343 #endif 00344 virtual int32_t move32(int32_t delta, EOrigin origin) override; 00345 00350 void setText(ConstChar16Ptr newText, int32_t newTextLength); 00351 00359 virtual void getText(UnicodeString& result) override; 00360 00366 static UClassID U_EXPORT2 getStaticClassID(void); 00367 00373 virtual UClassID getDynamicClassID(void) const override; 00374 00375 protected: 00380 UCharCharacterIterator(); 00385 const char16_t* text; 00386 00387 }; 00388 00389 U_NAMESPACE_END 00390 00391 #endif /* U_SHOW_CPLUSPLUS_API */ 00392 00393 #endif
1.7.6.1