ICU 4.8.1.1
4.8.1.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
i18n
unicode
utrans.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/21/00 aliu Creation.
8
*******************************************************************************
9
*/
10
11
#ifndef UTRANS_H
12
#define UTRANS_H
13
14
#include "
unicode/utypes.h
"
15
16
#if !UCONFIG_NO_TRANSLITERATION
17
18
#include "
unicode/localpointer.h
"
19
#include "
unicode/urep.h
"
20
#include "
unicode/parseerr.h
"
21
#include "
unicode/uenum.h
"
22
23
/********************************************************************
24
* General Notes
25
********************************************************************
26
*/
56
/********************************************************************
57
* Data Structures
58
********************************************************************/
59
67
typedef
void
*
UTransliterator
;
68
77
typedef
enum
UTransDirection
{
78
85
UTRANS_FORWARD
,
86
93
UTRANS_REVERSE
94
95
}
UTransDirection
;
96
119
typedef
struct
UTransPosition
{
120
129
int32_t
contextStart
;
130
139
int32_t
contextLimit
;
140
148
int32_t
start
;
149
157
int32_t
limit
;
158
159
}
UTransPosition
;
160
161
/********************************************************************
162
* General API
163
********************************************************************/
164
188
U_STABLE
UTransliterator
*
U_EXPORT2
189
utrans_openU
(
const
UChar
*
id
,
190
int32_t idLength,
191
UTransDirection
dir,
192
const
UChar
*rules,
193
int32_t rulesLength,
194
UParseError
*parseError,
195
UErrorCode
*pErrorCode);
196
212
U_STABLE
UTransliterator
*
U_EXPORT2
213
utrans_openInverse
(
const
UTransliterator
* trans,
214
UErrorCode
* status);
215
226
U_STABLE
UTransliterator
*
U_EXPORT2
227
utrans_clone
(
const
UTransliterator
* trans,
228
UErrorCode
* status);
229
236
U_STABLE
void
U_EXPORT2
237
utrans_close
(
UTransliterator
* trans);
238
239
#if U_SHOW_CPLUSPLUS_API
240
241
U_NAMESPACE_BEGIN
242
252
U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer,
UTransliterator
,
utrans_close
);
253
254
U_NAMESPACE_END
255
256
#endif
257
272
U_STABLE
const
UChar
*
U_EXPORT2
273
utrans_getUnicodeID
(
const
UTransliterator
*trans,
274
int32_t *resultLength);
275
290
U_STABLE
void
U_EXPORT2
291
utrans_register
(
UTransliterator
* adoptedTrans,
292
UErrorCode
* status);
293
303
U_STABLE
void
U_EXPORT2
304
utrans_unregisterID
(
const
UChar
*
id
, int32_t idLength);
305
324
U_STABLE
void
U_EXPORT2
325
utrans_setFilter
(
UTransliterator
* trans,
326
const
UChar
* filterPattern,
327
int32_t filterPatternLen,
328
UErrorCode
* status);
329
337
U_STABLE
int32_t
U_EXPORT2
338
utrans_countAvailableIDs
(
void
);
339
349
U_STABLE
UEnumeration
*
U_EXPORT2
350
utrans_openIDs
(
UErrorCode
*pErrorCode);
351
352
/********************************************************************
353
* Transliteration API
354
********************************************************************/
355
379
U_STABLE
void
U_EXPORT2
380
utrans_trans
(
const
UTransliterator
* trans,
381
UReplaceable
* rep,
382
UReplaceableCallbacks
* repFunc,
383
int32_t start,
384
int32_t* limit,
385
UErrorCode
* status);
386
430
U_STABLE
void
U_EXPORT2
431
utrans_transIncremental
(
const
UTransliterator
* trans,
432
UReplaceable
* rep,
433
UReplaceableCallbacks
* repFunc,
434
UTransPosition
* pos,
435
UErrorCode
* status);
436
468
U_STABLE
void
U_EXPORT2
469
utrans_transUChars
(
const
UTransliterator
* trans,
470
UChar
* text,
471
int32_t* textLength,
472
int32_t textCapacity,
473
int32_t start,
474
int32_t* limit,
475
UErrorCode
* status);
476
503
U_STABLE
void
U_EXPORT2
504
utrans_transIncrementalUChars
(
const
UTransliterator
* trans,
505
UChar
* text,
506
int32_t* textLength,
507
int32_t textCapacity,
508
UTransPosition
* pos,
509
UErrorCode
* status);
510
511
/* deprecated API ----------------------------------------------------------- */
512
513
/* see utrans.h documentation for why these functions are deprecated */
514
538
U_DEPRECATED
UTransliterator
*
U_EXPORT2
539
utrans_open
(
const
char
*
id
,
540
UTransDirection
dir,
541
const
UChar
* rules,
/* may be Null */
542
int32_t rulesLength,
/* -1 if null-terminated */
543
UParseError
* parseError,
/* may be Null */
544
UErrorCode
* status);
545
561
U_DEPRECATED
int32_t
U_EXPORT2
562
utrans_getID
(
const
UTransliterator
* trans,
563
char
* buf,
564
int32_t bufCapacity);
565
575
U_DEPRECATED
void
U_EXPORT2
576
utrans_unregister
(
const
char
*
id
);
577
596
U_DEPRECATED
int32_t
U_EXPORT2
597
utrans_getAvailableID
(int32_t index,
598
char
* buf,
599
int32_t bufCapacity);
600
601
#endif
/* #if !UCONFIG_NO_TRANSLITERATION */
602
603
#endif
Generated on Thu Oct 10 2013 17:22:19 for ICU 4.8.1.1 by
1.8.1.2