Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

uiter.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 2002-2003, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ******************************************************************************* 00008 * file name: uiter.h 00009 * encoding: US-ASCII 00010 * tab size: 8 (not used) 00011 * indentation:4 00012 * 00013 * created on: 2002jan18 00014 * created by: Markus W. Scherer 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 00054 enum { 00069 UITER_UNKNOWN_INDEX=-2 00070 }; 00071 00083 #define UITER_NO_STATE ((uint32_t)0xffffffff) 00084 00103 typedef int32_t U_CALLCONV 00104 UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin); 00105 00140 typedef int32_t U_CALLCONV 00141 UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin); 00142 00155 typedef UBool U_CALLCONV 00156 UCharIteratorHasNext(UCharIterator *iter); 00157 00169 typedef UBool U_CALLCONV 00170 UCharIteratorHasPrevious(UCharIterator *iter); 00171 00184 typedef UChar32 U_CALLCONV 00185 UCharIteratorCurrent(UCharIterator *iter); 00186 00200 typedef UChar32 U_CALLCONV 00201 UCharIteratorNext(UCharIterator *iter); 00202 00216 typedef UChar32 U_CALLCONV 00217 UCharIteratorPrevious(UCharIterator *iter); 00218 00230 typedef int32_t U_CALLCONV 00231 UCharIteratorReserved(UCharIterator *iter, int32_t something); 00232 00277 typedef uint32_t U_CALLCONV 00278 UCharIteratorGetState(const UCharIterator *iter); 00279 00305 typedef void U_CALLCONV 00306 UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00307 00308 00338 struct UCharIterator { 00344 const void *context; 00345 00351 int32_t length; 00352 00358 int32_t start; 00359 00365 int32_t index; 00366 00372 int32_t limit; 00373 00378 int32_t reservedField; 00379 00387 UCharIteratorGetIndex *getIndex; 00388 00398 UCharIteratorMove *move; 00399 00407 UCharIteratorHasNext *hasNext; 00408 00415 UCharIteratorHasPrevious *hasPrevious; 00416 00424 UCharIteratorCurrent *current; 00425 00434 UCharIteratorNext *next; 00435 00444 UCharIteratorPrevious *previous; 00445 00452 UCharIteratorReserved *reservedFn; 00453 00461 UCharIteratorGetState *getState; 00462 00471 UCharIteratorSetState *setState; 00472 }; 00473 00492 U_CAPI UChar32 U_EXPORT2 00493 uiter_current32(UCharIterator *iter); 00494 00509 U_CAPI UChar32 U_EXPORT2 00510 uiter_next32(UCharIterator *iter); 00511 00526 U_CAPI UChar32 U_EXPORT2 00527 uiter_previous32(UCharIterator *iter); 00528 00547 U_CAPI uint32_t U_EXPORT2 00548 uiter_getState(const UCharIterator *iter); 00549 00565 U_CAPI void U_EXPORT2 00566 uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00567 00590 U_CAPI void U_EXPORT2 00591 uiter_setString(UCharIterator *iter, const UChar *s, int32_t length); 00592 00613 U_CAPI void U_EXPORT2 00614 uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length); 00615 00649 U_CAPI void U_EXPORT2 00650 uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length); 00651 00652 #ifdef XP_CPLUSPLUS 00653 00674 U_CAPI void U_EXPORT2 00675 uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter); 00676 00699 U_CAPI void U_EXPORT2 00700 uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep); 00701 00702 #endif 00703 00704 U_CDECL_END 00705 00706 #endif

Generated on Wed Sep 15 17:18:09 2004 for ICU 2.8 by doxygen 1.3.8