17 #if U_SHOW_CPLUSPLUS_API
101 enum { DONE = 0xffff };
136 virtual int32_t hashCode(
void)
const = 0;
155 virtual char16_t nextPostInc(
void) = 0;
165 virtual UChar32 next32PostInc(
void) = 0;
176 virtual UBool hasNext() = 0;
392 virtual char16_t first(
void) = 0;
402 virtual char16_t firstPostInc(
void);
413 virtual UChar32 first32(
void) = 0;
423 virtual UChar32 first32PostInc(
void);
432 inline int32_t setToStart();
441 virtual char16_t last(
void) = 0;
450 virtual UChar32 last32(
void) = 0;
459 inline int32_t setToEnd();
469 virtual char16_t setIndex(int32_t position) = 0;
482 virtual UChar32 setIndex32(int32_t position) = 0;
489 virtual char16_t current(
void)
const = 0;
496 virtual UChar32 current32(
void)
const = 0;
505 virtual char16_t next(
void) = 0;
517 virtual UChar32 next32(
void) = 0;
526 virtual char16_t previous(
void) = 0;
535 virtual UChar32 previous32(
void) = 0;
546 virtual UBool hasPrevious() = 0;
558 inline int32_t startIndex(
void)
const;
569 inline int32_t endIndex(
void)
const;
579 inline int32_t getIndex(
void)
const;
587 inline int32_t getLength()
const;
600 virtual int32_t move(int32_t delta, EOrigin origin) = 0;
617 virtual int32_t move32(int32_t delta, EOrigin origin) = 0;
650 CharacterIterator(int32_t length, int32_t textBegin, int32_t textEnd, int32_t position);
701 CharacterIterator::setToStart() {
702 return move(0, kStart);
706 CharacterIterator::setToEnd() {
707 return move(0, kEnd);
711 CharacterIterator::startIndex(
void)
const {
716 CharacterIterator::endIndex(
void)
const {
721 CharacterIterator::getIndex(
void)
const {
726 CharacterIterator::getLength(
void)
const {
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Abstract class that defines an API for iteration on text objects.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
int32_t textLength
Base class text length field.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
int32_t begin
Base class field for the start of the iteration range.
C++ API: Common ICU base class UObject.
int32_t pos
Base class field for the current position.
Abstract class that defines an API for forward-only iteration on text objects.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
ForwardCharacterIterator & operator=(const ForwardCharacterIterator &)
Assignment operator to be overridden in the implementing class.
int32_t end
Base class field for the end of the iteration range.
UObject is the common ICU "boilerplate" class.
EOrigin
Origin enumeration for the move() and move32() functions.
int8_t UBool
The ICU boolean type, a signed-byte integer.