uiter.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 2002-2004, 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 00053 #ifndef U_HIDE_DRAFT_API 00054 00056 enum { 00071 UITER_UNKNOWN_INDEX=-2 00072 }; 00073 00074 00086 #define UITER_NO_STATE ((uint32_t)0xffffffff) 00087 00088 #endif /*U_HIDE_DRAFT_API*/ 00089 00108 typedef int32_t U_CALLCONV 00109 UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin); 00110 00145 typedef int32_t U_CALLCONV 00146 UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin); 00147 00160 typedef UBool U_CALLCONV 00161 UCharIteratorHasNext(UCharIterator *iter); 00162 00174 typedef UBool U_CALLCONV 00175 UCharIteratorHasPrevious(UCharIterator *iter); 00176 00189 typedef UChar32 U_CALLCONV 00190 UCharIteratorCurrent(UCharIterator *iter); 00191 00205 typedef UChar32 U_CALLCONV 00206 UCharIteratorNext(UCharIterator *iter); 00207 00221 typedef UChar32 U_CALLCONV 00222 UCharIteratorPrevious(UCharIterator *iter); 00223 00235 typedef int32_t U_CALLCONV 00236 UCharIteratorReserved(UCharIterator *iter, int32_t something); 00237 00282 typedef uint32_t U_CALLCONV 00283 UCharIteratorGetState(const UCharIterator *iter); 00284 00310 typedef void U_CALLCONV 00311 UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00312 00313 00343 struct UCharIterator { 00349 const void *context; 00350 00356 int32_t length; 00357 00363 int32_t start; 00364 00370 int32_t index; 00371 00377 int32_t limit; 00378 00383 int32_t reservedField; 00384 00392 UCharIteratorGetIndex *getIndex; 00393 00403 UCharIteratorMove *move; 00404 00412 UCharIteratorHasNext *hasNext; 00413 00420 UCharIteratorHasPrevious *hasPrevious; 00421 00429 UCharIteratorCurrent *current; 00430 00439 UCharIteratorNext *next; 00440 00449 UCharIteratorPrevious *previous; 00450 00457 UCharIteratorReserved *reservedFn; 00458 00466 UCharIteratorGetState *getState; 00467 00476 UCharIteratorSetState *setState; 00477 }; 00478 00497 U_STABLE UChar32 U_EXPORT2 00498 uiter_current32(UCharIterator *iter); 00499 00514 U_STABLE UChar32 U_EXPORT2 00515 uiter_next32(UCharIterator *iter); 00516 00531 U_STABLE UChar32 U_EXPORT2 00532 uiter_previous32(UCharIterator *iter); 00533 00552 U_DRAFT uint32_t U_EXPORT2 00553 uiter_getState(const UCharIterator *iter); 00554 00570 U_DRAFT void U_EXPORT2 00571 uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00572 00595 U_STABLE void U_EXPORT2 00596 uiter_setString(UCharIterator *iter, const UChar *s, int32_t length); 00597 00618 U_DRAFT void U_EXPORT2 00619 uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length); 00620 00654 U_DRAFT void U_EXPORT2 00655 uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length); 00656 00657 #ifdef XP_CPLUSPLUS 00658 00679 U_STABLE void U_EXPORT2 00680 uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter); 00681 00704 U_STABLE void U_EXPORT2 00705 uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep); 00706 00707 #endif 00708 00709 U_CDECL_END 00710 00711 #endif

Generated on Fri Jun 18 12:36:00 2004 for ICU by doxygen 1.3.7