ICU 73.2  73.2
urep.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 ******************************************************************************
00005 *   Copyright (C) 1997-2010, International Business Machines
00006 *   Corporation and others.  All Rights Reserved.
00007 ******************************************************************************
00008 *   Date        Name        Description
00009 *   06/23/00    aliu        Creation.
00010 ******************************************************************************
00011 */
00012 
00013 #ifndef __UREP_H
00014 #define __UREP_H
00015 
00016 #include "unicode/utypes.h"
00017 
00018 U_CDECL_BEGIN
00019 
00020 /********************************************************************
00021  * General Notes
00022  ********************************************************************
00023  * TODO
00024  * Add usage scenario
00025  * Add test code
00026  * Talk about pinning
00027  * Talk about "can truncate result if out of memory"
00028  */
00029 
00030 /********************************************************************
00031  * Data Structures
00032  ********************************************************************/
00044 typedef void* UReplaceable;
00045 
00053 typedef struct UReplaceableCallbacks {
00054 
00063     int32_t (*length)(const UReplaceable* rep);
00064 
00076     UChar   (*charAt)(const UReplaceable* rep,
00077                       int32_t offset);
00078 
00089     UChar32 (*char32At)(const UReplaceable* rep,
00090                         int32_t offset);
00091     
00108     void    (*replace)(UReplaceable* rep,
00109                        int32_t start,
00110                        int32_t limit,
00111                        const UChar* text,
00112                        int32_t textLength);
00113     
00127     void    (*extract)(UReplaceable* rep,
00128                        int32_t start,
00129                        int32_t limit,
00130                        UChar* dst);
00131 
00148     void    (*copy)(UReplaceable* rep,
00149                     int32_t start,
00150                     int32_t limit,
00151                     int32_t dest);    
00152 
00153 } UReplaceableCallbacks;
00154 
00155 U_CDECL_END
00156 
00157 #endif