ICU 56.1: urep.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

urep.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 * Copyright (C) 1997-2010, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************
6 * Date Name Description
7 * 06/23/00 aliu Creation.
8 ******************************************************************************
9 */
10
11 #ifndef __UREP_H
12 #define __UREP_H
13
14 #include "unicode/utypes.h"
15
16 U_CDECL_BEGIN
17
18 /********************************************************************
19 * General Notes
20 ********************************************************************
21 * TODO
22 * Add usage scenario
23 * Add test code
24 * Talk about pinning
25 * Talk about "can truncate result if out of memory"
26 */
27
28 /********************************************************************
29 * Data Structures
30 ********************************************************************/
42 typedef void* UReplaceable;
43
51 typedef struct UReplaceableCallbacks {
52
61 int32_t (*length)(const UReplaceable* rep);
62
74 UChar (*charAt)(const UReplaceable* rep,
75 int32_t offset);
76
87 UChar32 (*char32At)(const UReplaceable* rep,
88 int32_t offset);
89
106 void (*replace)(UReplaceable* rep,
107 int32_t start,
108 int32_t limit,
109 const UChar* text,
110 int32_t textLength);
111
125 void (*extract)(UReplaceable* rep,
126 int32_t start,
127 int32_t limit,
128 UChar* dst);
129
146 void (*copy)(UReplaceable* rep,
147 int32_t start,
148 int32_t limit,
149 int32_t dest);
150
151 } UReplaceableCallbacks;
152
153 U_CDECL_END
154
155 #endif
UReplaceableCallbacks::extract
void(* extract)(UReplaceable *rep, int32_t start, int32_t limit, UChar *dst)
Function pointer that copies the characters in the range [start, limit) into the array dst...
Definition: urep.h:125
UReplaceable
void * UReplaceable
An opaque replaceable text object.
Definition: urep.h:42
UReplaceableCallbacks::char32At
UChar32(* char32At)(const UReplaceable *rep, int32_t offset)
Function pointer that returns a UChar32 code point at the given offset into this text.
Definition: urep.h:87
UReplaceableCallbacks::copy
void(* copy)(UReplaceable *rep, int32_t start, int32_t limit, int32_t dest)
Function pointer that copies text between start and limit in this text to another index in the text...
Definition: urep.h:146
U_CDECL_BEGIN
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition: umachine.h:82
UReplaceableCallbacks::length
int32_t(* length)(const UReplaceable *rep)
Function pointer that returns the number of UChar code units in this text.
Definition: urep.h:61
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition: umachine.h:332
UReplaceableCallbacks
struct UReplaceableCallbacks UReplaceableCallbacks
A set of function pointers that transliterators use to manipulate a UReplaceable. ...
UReplaceableCallbacks
A set of function pointers that transliterators use to manipulate a UReplaceable. ...
Definition: urep.h:51
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
U_CDECL_END
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition: umachine.h:83
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UReplaceableCallbacks::replace
void(* replace)(UReplaceable *rep, int32_t start, int32_t limit, const UChar *text, int32_t textLength)
Function pointer that replaces text between start and limit in this text with the given text...
Definition: urep.h:106
UReplaceableCallbacks::charAt
UChar(* charAt)(const UReplaceable *rep, int32_t offset)
Function pointer that returns a UChar code units at the given offset into this text; 0 <= offset < n...
Definition: urep.h:74