#include <schriter.h>
Class diagram for StringCharacterIterator:
Public Members | |||
![]() | ![]() | StringCharacterIterator (const UnicodeString& text) | |
![]() | ![]() | Create an iterator over the UnicodeString referred to by "text". More... | |
![]() | ![]() | StringCharacterIterator (const UnicodeString& text, UTextOffset pos) | |
![]() | ![]() | Create an iterator over the UnicodeString referred to by "text". More... | |
![]() | ![]() | StringCharacterIterator (const UnicodeString& text, UTextOffset begin, UTextOffset end, UTextOffset pos) | |
![]() | ![]() | Create an iterator over the UnicodeString referred to by "text". More... | |
![]() | ![]() | StringCharacterIterator (const StringCharacterIterator& that) | |
![]() | ![]() | Copy constructor. More... | |
![]() | ![]() | virtual | ~StringCharacterIterator () |
![]() | ![]() | Destructor. More... | |
![]() | ![]() | StringCharacterIterator& | operator= (const StringCharacterIterator& that) |
![]() | ![]() | Assignment operator. More... | |
![]() | ![]() | virtual bool_t | operator== (const CharacterIterator& that) const |
![]() | ![]() | Returns true if the iterators iterate over the same range of the same string and are pointing at the same character. More... | |
![]() | ![]() | virtual int32_t | hashCode (void) const |
![]() | ![]() | Generates a hash code for this iterator. More... | |
![]() | ![]() | virtual CharacterIterator* | clone (void) const |
![]() | ![]() | Returns a new StringCharacterIterator referring to the same character in the same range of the same string as this one. More... | |
![]() | ![]() | virtual UChar | first (void) |
![]() | ![]() | Sets the iterator to refer to the first character in its iteration range, and returns that character,. More... | |
![]() | ![]() | virtual UChar | last (void) |
![]() | ![]() | Sets the iterator to refer to the last character in its iteration range, and returns that character. More... | |
![]() | ![]() | virtual UChar | setIndex (UTextOffset pos) |
![]() | ![]() | Sets the iterator to refer to the "position"-th character in the UnicodeString the iterator refers to, and returns that character. More... | |
![]() | ![]() | virtual UChar | current (void) const |
![]() | ![]() | Returns the character the iterator currently refers to. More... | |
![]() | ![]() | virtual UChar | next (void) |
![]() | ![]() | Advances to the next character in the iteration range (toward last()), and returns that character. More... | |
![]() | ![]() | virtual UChar | previous (void) |
![]() | ![]() | Advances to the previous character in the iteration rance (toward first()), and returns that character. More... | |
![]() | ![]() | virtual UTextOffset | startIndex (void) const |
![]() | ![]() | Returns the numeric index of the first character in this iterator's iteration range. More... | |
![]() | ![]() | virtual UTextOffset | endIndex (void) const |
![]() | ![]() | Returns the numeric index of the character immediately BEYOND the last character in this iterator's iteration range. More... | |
![]() | ![]() | virtual UTextOffset | getIndex (void) const |
![]() | ![]() | Returns the numeric index in the underlying UnicodeString of the character the iterator currently refers to (i.e., the character returned by current()). More... | |
![]() | ![]() | virtual void | setText (const UnicodeString& newText) |
![]() | ![]() | Sets the iterator to iterate over the provided string. More... | |
![]() | ![]() | virtual void | getText (UnicodeString& result) |
![]() | ![]() | Copies the UnicodeString under iteration into the UnicodeString referred to by "result". More... | |
![]() | ![]() | virtual UClassID | getDynamicClassID (void) const |
![]() | ![]() | Return a class ID for this object (not really public). More... | |
Static Public Members | |||
![]() | ![]() | UClassID | getStaticClassID (void) |
![]() | ![]() | Return a class ID for this class (not really public). More... |
It's possible not only to create an iterator that iterates over an entire UnicodeString, but also to create only that iterates over only a subrange of a UnicodeString (iterators over different subranges of the same UnicodeString don't compare equal).
StringCharacterIterator::StringCharacterIterator (const UnicodeString & text) |
Create an iterator over the UnicodeString referred to by "text".
The iteration range is the whole string, and the starting position is 0.
StringCharacterIterator::StringCharacterIterator (const UnicodeString & text, UTextOffset pos) |
Create an iterator over the UnicodeString referred to by "text".
The iteration range is the whole string, and the starting position is specified by "pos". If "pos" is outside the valid iteration range, the behavior of this object is undefined.
StringCharacterIterator::StringCharacterIterator (const UnicodeString & text, UTextOffset begin, UTextOffset end, UTextOffset pos) |
Create an iterator over the UnicodeString referred to by "text".
The iteration range begins with the character specified by "begin" and ends with the character BEFORE the character specfied by "end". The starting position is specified by "pos". If "begin" and "end" don't form a valid range on "text" (i.e., begin >= end or either is negative or greater than text.size()), or "pos" is outside the range defined by "begin" and "end", the behavior of this iterator is undefined.
StringCharacterIterator::StringCharacterIterator (const StringCharacterIterator & that) |
Copy constructor.
The new iterator iterates over the same range of the same string as "that", and its initial position is the same as "that"'s current position.
virtual StringCharacterIterator::~StringCharacterIterator () [virtual]
|
Destructor.
StringCharacterIterator & StringCharacterIterator::operator= (const StringCharacterIterator & that) |
Assignment operator.
*this is altered to iterate over the sane range of the same string as "that", and refers to the same character within that string as "that" does.
virtual bool_t StringCharacterIterator::operator== (const CharacterIterator & that) const [virtual]
|
Returns true if the iterators iterate over the same range of the same string and are pointing at the same character.
Reimplemented from CharacterIterator.
virtual int32_t StringCharacterIterator::hashCode (void) const [virtual]
|
virtual CharacterIterator * StringCharacterIterator::clone (void) const [virtual]
|
Returns a new StringCharacterIterator referring to the same character in the same range of the same string as this one.
The caller must delete the new iterator.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::first (void) [virtual]
|
Sets the iterator to refer to the first character in its iteration range, and returns that character,.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::last (void) [virtual]
|
Sets the iterator to refer to the last character in its iteration range, and returns that character.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::setIndex (UTextOffset pos) [virtual]
|
Sets the iterator to refer to the "position"-th character in the UnicodeString the iterator refers to, and returns that character.
If the index is outside the iterator's iteration range, the behavior of the iterator is undefined.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::current (void) const [virtual]
|
Returns the character the iterator currently refers to.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::next (void) [virtual]
|
Advances to the next character in the iteration range (toward last()), and returns that character.
If there are no more characters to return, returns DONE.
Reimplemented from CharacterIterator.
virtual UChar StringCharacterIterator::previous (void) [virtual]
|
Advances to the previous character in the iteration rance (toward first()), and returns that character.
If there are no more characters to return, returns DONE.
Reimplemented from CharacterIterator.
virtual UTextOffset StringCharacterIterator::startIndex (void) const [virtual]
|
Returns the numeric index of the first character in this iterator's iteration range.
Reimplemented from CharacterIterator.
virtual UTextOffset StringCharacterIterator::endIndex (void) const [virtual]
|
Returns the numeric index of the character immediately BEYOND the last character in this iterator's iteration range.
Reimplemented from CharacterIterator.
virtual UTextOffset StringCharacterIterator::getIndex (void) const [virtual]
|
Returns the numeric index in the underlying UnicodeString of the character the iterator currently refers to (i.e., the character returned by current()).
Reimplemented from CharacterIterator.
virtual void StringCharacterIterator::setText (const UnicodeString & newText) [virtual]
|
Sets the iterator to iterate over the provided string.
virtual void StringCharacterIterator::getText (UnicodeString & result) [virtual]
|
Copies the UnicodeString under iteration into the UnicodeString referred to by "result".
Even if this iterator iterates across only a part of this string, the whole string is copied.
result | Receives a copy of the text under iteration. |
Reimplemented from CharacterIterator.
virtual UClassID StringCharacterIterator::getDynamicClassID (void) const [inline, virtual]
|
Return a class ID for this object (not really public).
Reimplemented from CharacterIterator.
UClassID StringCharacterIterator::getStaticClassID (void) [inline, static]
|
Return a class ID for this class (not really public).