Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

UCharIterator Struct Reference

C API for code unit iteration. More...

#include <uiter.h>

List of all members.

Public Attributes

const void * context
 (protected) Pointer to string or wrapped object or similar. More...

int32_t length
 (protected) Length of string or similar. More...

int32_t start
 (protected) Start index or similar. More...

int32_t index
 (protected) Current index or similar. More...

int32_t limit
 (protected) Limit index or similar. More...

int32_t reservedField
 (protected) Not currently used by any instance. More...

UCharIteratorGetIndexgetIndex
 (public) Returns the current position or the start or limit index of the iteration range. More...

UCharIteratorMovemove
 (public) Moves the current position relative to the start or limit of the iteration range, or relative to the current position itself. More...

UCharIteratorHasNexthasNext
 (public) Check if current and next can still return another code unit. More...

UCharIteratorHasPrevioushasPrevious
 (public) Check if previous can still return another code unit. More...

UCharIteratorCurrentcurrent
 (public) Return the code unit at the current position, or U_SENTINEL if there is none (index is at the limit). More...

UCharIteratorNextnext
 (public) Return the code unit at the current index and increment the index (post-increment, like s[i++]), or return U_SENTINEL if there is none (index is at the limit). More...

UCharIteratorPreviousprevious
 (public) Decrement the index and return the code unit from there (pre-decrement, like s[--i]), or return U_SENTINEL if there is none (index is at the start). More...

UCharIteratorReservedreservedFn
 (public) Reserved for future use. More...


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.

UCharIterator functions return code unit values 0..0xffff, or U_SENTINEL if the iteration bounds are reached.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 204 of file uiter.h.


Member Data Documentation

const void* UCharIterator::context
 

(protected) Pointer to string or wrapped object or similar.

Not used by caller.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 210 of file uiter.h.

UCharIteratorCurrent* UCharIterator::current
 

(public) Return the code unit at the current position, or U_SENTINEL if there is none (index is at the limit).

See also:
UCharIteratorCurrent
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 290 of file uiter.h.

UCharIteratorGetIndex* UCharIterator::getIndex
 

(public) Returns the current position or the start or limit index of the iteration range.

See also:
UCharIteratorGetIndex
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 253 of file uiter.h.

UCharIteratorHasNext* UCharIterator::hasNext
 

(public) Check if current and next can still return another code unit.

See also:
UCharIteratorHasNext
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 273 of file uiter.h.

UCharIteratorHasPrevious* UCharIterator::hasPrevious
 

(public) Check if previous can still return another code unit.

See also:
UCharIteratorHasPrevious
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 281 of file uiter.h.

int32_t UCharIterator::index
 

(protected) Current index or similar.

Not used by caller.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 231 of file uiter.h.

int32_t UCharIterator::length
 

(protected) Length of string or similar.

Not used by caller.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 217 of file uiter.h.

int32_t UCharIterator::limit
 

(protected) Limit index or similar.

Not used by caller.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 238 of file uiter.h.

UCharIteratorMove* UCharIterator::move
 

(public) Moves the current position relative to the start or limit of the iteration range, or relative to the current position itself.

The movement is expressed in numbers of code units forward or backward by specifying a positive or negative delta.

See also:
UCharIteratorMove
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 264 of file uiter.h.

UCharIteratorNext* UCharIterator::next
 

(public) Return the code unit at the current index and increment the index (post-increment, like s[i++]), or return U_SENTINEL if there is none (index is at the limit).

See also:
UCharIteratorNext
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 300 of file uiter.h.

UCharIteratorPrevious* UCharIterator::previous
 

(public) Decrement the index and return the code unit from there (pre-decrement, like s[--i]), or return U_SENTINEL if there is none (index is at the start).

See also:
UCharIteratorPrevious
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 310 of file uiter.h.

int32_t UCharIterator::reservedField
 

(protected) Not currently used by any instance.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 244 of file uiter.h.

UCharIteratorReserved* UCharIterator::reservedFn
 

(public) Reserved for future use.

Currently NULL.

See also:
UCharIteratorReserved
Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 318 of file uiter.h.

int32_t UCharIterator::start
 

(protected) Start index or similar.

Not used by caller.

Draft:
This API has been introduced in ICU 2.1. It is still in draft state and may be modified in a future release.

Definition at line 224 of file uiter.h.


The documentation for this struct was generated from the following file:
Generated on Wed Dec 18 16:52:25 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001