00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __UITER_H__
00018 #define __UITER_H__
00019
00027 #include "unicode/utypes.h"
00028
00029 #ifdef XP_CPLUSPLUS
00030 U_NAMESPACE_BEGIN
00031
00032 class CharacterIterator;
00033 class Replaceable;
00034
00035 U_NAMESPACE_END
00036 #endif
00037
00038 U_CDECL_BEGIN
00039
00040 struct UCharIterator;
00041 typedef struct UCharIterator UCharIterator;
00049 typedef enum UCharIteratorOrigin {
00050 UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH
00051 } UCharIteratorOrigin;
00052
00067 typedef int32_t U_CALLCONV
00068 UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin);
00069
00090 typedef int32_t U_CALLCONV
00091 UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin);
00092
00105 typedef UBool U_CALLCONV
00106 UCharIteratorHasNext(UCharIterator *iter);
00107
00119 typedef UBool U_CALLCONV
00120 UCharIteratorHasPrevious(UCharIterator *iter);
00121
00134 typedef UChar32 U_CALLCONV
00135 UCharIteratorCurrent(UCharIterator *iter);
00136
00150 typedef UChar32 U_CALLCONV
00151 UCharIteratorNext(UCharIterator *iter);
00152
00166 typedef UChar32 U_CALLCONV
00167 UCharIteratorPrevious(UCharIterator *iter);
00168
00180 typedef int32_t U_CALLCONV
00181 UCharIteratorReserved(UCharIterator *iter, int32_t something);
00182
00183
00204 struct UCharIterator {
00210 const void *context;
00211
00217 int32_t length;
00218
00224 int32_t start;
00225
00231 int32_t index;
00232
00238 int32_t limit;
00239
00244 int32_t reservedField;
00245
00253 UCharIteratorGetIndex *getIndex;
00254
00264 UCharIteratorMove *move;
00265
00273 UCharIteratorHasNext *hasNext;
00274
00281 UCharIteratorHasPrevious *hasPrevious;
00282
00290 UCharIteratorCurrent *current;
00291
00300 UCharIteratorNext *next;
00301
00310 UCharIteratorPrevious *previous;
00311
00318 UCharIteratorReserved *reservedFn;
00319 };
00320
00339 U_CAPI UChar32 U_EXPORT2
00340 uiter_current32(UCharIterator *iter);
00341
00356 U_CAPI UChar32 U_EXPORT2
00357 uiter_next32(UCharIterator *iter);
00358
00373 U_CAPI UChar32 U_EXPORT2
00374 uiter_previous32(UCharIterator *iter);
00375
00395 U_CAPI void U_EXPORT2
00396 uiter_setString(UCharIterator *iter, const UChar *s, int32_t length);
00397
00398 #ifdef XP_CPLUSPLUS
00399
00417 U_CAPI void U_EXPORT2
00418 uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter);
00419
00439 U_CAPI void U_EXPORT2
00440 uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep);
00441
00442 #endif
00443
00444 U_CDECL_END
00445
00446 #endif