#include <uiter.h>
There are two roles for using UCharIterator:
A "provider" sets the necessary function pointers and controls the "protected" fields of the UCharIterator structure. A "provider" passes a UCharIterator into C APIs that need a UCharIterator as an abstract, flexible string interface.
Implementations of such C APIs are "callers" of UCharIterator functions; they only use the "public" function pointers and never access the "protected" fields directly.
The current() and next() functions only check the current index against the limit, and previous() only checks the current index against the start, to see if the iterator already reached the end of the iteration range.
The assumption - in all iterators - is that the index is moved via the API, which means it won't go out of bounds, or the index is modified by user code that knows enough about the iterator implementation to set valid index values.
UCharIterator functions return code unit values 0..0xffff, or U_SENTINEL if the iteration bounds are reached.
ICU 2.1
Definition at line 339 of file uiter.h.
Public Attributes | |
const void * | context |
UCharIteratorCurrent * | current |
UCharIteratorGetIndex * | getIndex |
UCharIteratorGetState * | getState |
UCharIteratorHasNext * | hasNext |
UCharIteratorHasPrevious * | hasPrevious |
int32_t | index |
int32_t | length |
int32_t | limit |
UCharIteratorMove * | move |
UCharIteratorNext * | next |
UCharIteratorPrevious * | previous |
int32_t | reservedField |
UCharIteratorReserved * | reservedFn |
UCharIteratorSetState * | setState |
int32_t | start |