Logo Search packages:      
Sourcecode: icu version File versions  Download package

UCharIterator Struct Reference

#include <uiter.h>

List of all members.

Detailed Description

C API for code unit iteration. This can be used as a C wrapper around CharacterIterator, Replaceable, or implemented using simple strings, etc.

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
int32_t index
int32_t length
int32_t limit
int32_t reservedField
int32_t start

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index