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

uiter.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 2002, 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;
00042 
00049 enum UCharIteratorOrigin {
00050     UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH
00051 };
00052 typedef enum UCharIteratorOrigin UCharIteratorOrigin;
00053 
00068 typedef int32_t U_CALLCONV
00069 UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin);
00070 
00091 typedef int32_t U_CALLCONV
00092 UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin);
00093 
00106 typedef UBool U_CALLCONV
00107 UCharIteratorHasNext(UCharIterator *iter);
00108 
00120 typedef UBool U_CALLCONV
00121 UCharIteratorHasPrevious(UCharIterator *iter);
00122  
00135 typedef int32_t U_CALLCONV
00136 UCharIteratorCurrent(UCharIterator *iter);
00137 
00151 typedef int32_t U_CALLCONV
00152 UCharIteratorNext(UCharIterator *iter);
00153 
00167 typedef int32_t U_CALLCONV
00168 UCharIteratorPrevious(UCharIterator *iter);
00169 
00181 typedef int32_t U_CALLCONV
00182 UCharIteratorReserved(UCharIterator *iter, int32_t something);
00183 
00184 
00206 struct UCharIterator {
00211     const void *context;
00212 
00217     int32_t length;
00218 
00223     int32_t start;
00224 
00229     int32_t index;
00230 
00235     int32_t limit;
00236 
00240     int32_t reservedField;
00241 
00248     UCharIteratorGetIndex *getIndex;
00249 
00258     UCharIteratorMove *move;
00259 
00266     UCharIteratorHasNext *hasNext;
00267 
00273     UCharIteratorHasPrevious *hasPrevious;
00274 
00281     UCharIteratorCurrent *current;
00282 
00290     UCharIteratorNext *next;
00291 
00299     UCharIteratorPrevious *previous;
00300 
00306     UCharIteratorReserved *reservedFn;
00307 };
00308 
00327 U_CAPI int32_t U_EXPORT2
00328 uiter_current32(UCharIterator *iter);
00329 
00344 U_CAPI int32_t U_EXPORT2
00345 uiter_next32(UCharIterator *iter);
00346 
00361 U_CAPI int32_t U_EXPORT2
00362 uiter_previous32(UCharIterator *iter);
00363 
00383 U_CAPI void U_EXPORT2
00384 uiter_setString(UCharIterator *iter, const UChar *s, int32_t length);
00385 
00386 #ifdef XP_CPLUSPLUS
00387 
00405 U_CAPI void U_EXPORT2
00406 uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter);
00407 
00427 U_CAPI void U_EXPORT2
00428 uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep);
00429 
00430 #endif
00431 
00432 U_CDECL_END
00433 
00434 #endif

Generated on Mon May 23 13:34:27 2005 for ICU 2.1 by  doxygen 1.4.2