Go to the documentation of this file.
98 enum { DONE = 0xffff };
133 virtual int32_t hashCode(
void)
const = 0;
152 virtual char16_t nextPostInc(
void) = 0;
162 virtual UChar32 next32PostInc(
void) = 0;
173 virtual UBool hasNext() = 0;
389 virtual char16_t first(
void) = 0;
399 virtual char16_t firstPostInc(
void);
410 virtual UChar32 first32(
void) = 0;
420 virtual UChar32 first32PostInc(
void);
429 inline int32_t setToStart();
438 virtual char16_t last(
void) = 0;
447 virtual UChar32 last32(
void) = 0;
456 inline int32_t setToEnd();
466 virtual char16_t setIndex(int32_t position) = 0;
479 virtual UChar32 setIndex32(int32_t position) = 0;
486 virtual char16_t current(
void)
const = 0;
493 virtual UChar32 current32(
void)
const = 0;
502 virtual char16_t next(
void) = 0;
514 virtual UChar32 next32(
void) = 0;
523 virtual char16_t previous(
void) = 0;
532 virtual UChar32 previous32(
void) = 0;
543 virtual UBool hasPrevious() = 0;
555 inline int32_t startIndex(
void)
const;
566 inline int32_t endIndex(
void)
const;
576 inline int32_t getIndex(
void)
const;
584 inline int32_t getLength()
const;
597 virtual int32_t move(int32_t delta, EOrigin origin) = 0;
614 virtual int32_t move32(int32_t delta, EOrigin origin) = 0;
647 CharacterIterator(int32_t length, int32_t textBegin, int32_t textEnd, int32_t position);
698 CharacterIterator::setToStart() {
699 return move(0, kStart);
703 CharacterIterator::setToEnd() {
704 return move(0, kEnd);
708 CharacterIterator::startIndex(
void)
const {
713 CharacterIterator::endIndex(
void)
const {
718 CharacterIterator::getIndex(
void)
const {
723 CharacterIterator::getLength(
void)
const {
int32_t textLength
Base class text length field.
int32_t begin
Base class field for the start of the iteration range.
Basic definitions for ICU, for both C and C++ APIs.
int32_t pos
Base class field for the current position.
int8_t UBool
The ICU boolean type.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
ForwardCharacterIterator & operator=(const ForwardCharacterIterator &)
Assignment operator to be overridden in the implementing class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
Abstract class that defines an API for forward-only iteration on text objects.
EOrigin
Origin enumeration for the move() and move32() functions.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Abstract class that defines an API for iteration on text objects.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_BEGIN
int32_t end
Base class field for the end of the iteration range.