ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ****************************************************************************** 00003 * Copyright (C) 1997-2010, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ****************************************************************************** 00006 * Date Name Description 00007 * 06/23/00 aliu Creation. 00008 ****************************************************************************** 00009 */ 00010 00011 #ifndef __UREP_H 00012 #define __UREP_H 00013 00014 #include "unicode/utypes.h" 00015 00016 U_CDECL_BEGIN 00017 00018 /******************************************************************** 00019 * General Notes 00020 ******************************************************************** 00021 * TODO 00022 * Add usage scenario 00023 * Add test code 00024 * Talk about pinning 00025 * Talk about "can truncate result if out of memory" 00026 */ 00027 00028 /******************************************************************** 00029 * Data Structures 00030 ********************************************************************/ 00042 typedef void* UReplaceable; 00043 00051 typedef struct UReplaceableCallbacks { 00052 00061 int32_t (*length)(const UReplaceable* rep); 00062 00074 UChar (*charAt)(const UReplaceable* rep, 00075 int32_t offset); 00076 00087 UChar32 (*char32At)(const UReplaceable* rep, 00088 int32_t offset); 00089 00106 void (*replace)(UReplaceable* rep, 00107 int32_t start, 00108 int32_t limit, 00109 const UChar* text, 00110 int32_t textLength); 00111 00125 void (*extract)(UReplaceable* rep, 00126 int32_t start, 00127 int32_t limit, 00128 UChar* dst); 00129 00146 void (*copy)(UReplaceable* rep, 00147 int32_t start, 00148 int32_t limit, 00149 int32_t dest); 00150 00151 } UReplaceableCallbacks; 00152 00153 U_CDECL_END 00154 00155 #endif