|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * 00006 * Copyright (C) 2002-2011 International Business Machines 00007 * Corporation and others. All Rights Reserved. 00008 * 00009 ******************************************************************************* 00010 * file name: uiter.h 00011 * encoding: UTF-8 00012 * tab size: 8 (not used) 00013 * indentation:4 00014 * 00015 * created on: 2002jan18 00016 * created by: Markus W. Scherer 00017 */ 00018 00019 #ifndef __UITER_H__ 00020 #define __UITER_H__ 00021 00029 #include "unicode/utypes.h" 00030 00031 #if U_SHOW_CPLUSPLUS_API 00032 U_NAMESPACE_BEGIN 00033 00034 class CharacterIterator; 00035 class Replaceable; 00036 00037 U_NAMESPACE_END 00038 #endif 00039 00040 U_CDECL_BEGIN 00041 00042 struct UCharIterator; 00043 typedef struct UCharIterator UCharIterator; 00051 typedef enum UCharIteratorOrigin { 00052 UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH 00053 } UCharIteratorOrigin; 00054 00056 enum { 00071 UITER_UNKNOWN_INDEX=-2 00072 }; 00073 00074 00086 #define UITER_NO_STATE ((uint32_t)0xffffffff) 00087 00106 typedef int32_t U_CALLCONV 00107 UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin); 00108 00143 typedef int32_t U_CALLCONV 00144 UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin); 00145 00158 typedef UBool U_CALLCONV 00159 UCharIteratorHasNext(UCharIterator *iter); 00160 00172 typedef UBool U_CALLCONV 00173 UCharIteratorHasPrevious(UCharIterator *iter); 00174 00187 typedef UChar32 U_CALLCONV 00188 UCharIteratorCurrent(UCharIterator *iter); 00189 00203 typedef UChar32 U_CALLCONV 00204 UCharIteratorNext(UCharIterator *iter); 00205 00219 typedef UChar32 U_CALLCONV 00220 UCharIteratorPrevious(UCharIterator *iter); 00221 00233 typedef int32_t U_CALLCONV 00234 UCharIteratorReserved(UCharIterator *iter, int32_t something); 00235 00280 typedef uint32_t U_CALLCONV 00281 UCharIteratorGetState(const UCharIterator *iter); 00282 00308 typedef void U_CALLCONV 00309 UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00310 00311 00341 struct UCharIterator { 00347 const void *context; 00348 00354 int32_t length; 00355 00361 int32_t start; 00362 00368 int32_t index; 00369 00375 int32_t limit; 00376 00381 int32_t reservedField; 00382 00390 UCharIteratorGetIndex *getIndex; 00391 00401 UCharIteratorMove *move; 00402 00410 UCharIteratorHasNext *hasNext; 00411 00418 UCharIteratorHasPrevious *hasPrevious; 00419 00427 UCharIteratorCurrent *current; 00428 00437 UCharIteratorNext *next; 00438 00447 UCharIteratorPrevious *previous; 00448 00455 UCharIteratorReserved *reservedFn; 00456 00464 UCharIteratorGetState *getState; 00465 00474 UCharIteratorSetState *setState; 00475 }; 00476 00495 U_CAPI UChar32 U_EXPORT2 00496 uiter_current32(UCharIterator *iter); 00497 00512 U_CAPI UChar32 U_EXPORT2 00513 uiter_next32(UCharIterator *iter); 00514 00529 U_CAPI UChar32 U_EXPORT2 00530 uiter_previous32(UCharIterator *iter); 00531 00550 U_CAPI uint32_t U_EXPORT2 00551 uiter_getState(const UCharIterator *iter); 00552 00568 U_CAPI void U_EXPORT2 00569 uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); 00570 00593 U_CAPI void U_EXPORT2 00594 uiter_setString(UCharIterator *iter, const UChar *s, int32_t length); 00595 00616 U_CAPI void U_EXPORT2 00617 uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length); 00618 00652 U_CAPI void U_EXPORT2 00653 uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length); 00654 00655 #if U_SHOW_CPLUSPLUS_API 00656 00677 U_CAPI void U_EXPORT2 00678 uiter_setCharacterIterator(UCharIterator *iter, icu::CharacterIterator *charIter); 00679 00702 U_CAPI void U_EXPORT2 00703 uiter_setReplaceable(UCharIterator *iter, const icu::Replaceable *rep); 00704 00705 #endif 00706 00707 U_CDECL_END 00708 00709 #endif
1.7.6.1