ICU 54.1
54.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
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-2011,2014 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
#include "
unicode/uset.h
"
23
24
/********************************************************************
25
* General Notes
26
********************************************************************
27
*/
57
/********************************************************************
58
* Data Structures
59
********************************************************************/
60
68
typedef
void
*
UTransliterator
;
69
78
typedef
enum
UTransDirection
{
79
86
UTRANS_FORWARD
,
87
94
UTRANS_REVERSE
95
96
}
UTransDirection
;
97
120
typedef
struct
UTransPosition
{
121
130
int32_t
contextStart
;
131
140
int32_t
contextLimit
;
141
149
int32_t
start
;
150
158
int32_t
limit
;
159
160
}
UTransPosition
;
161
162
/********************************************************************
163
* General API
164
********************************************************************/
165
189
U_STABLE
UTransliterator
* U_EXPORT2
190
utrans_openU
(
const
UChar
*
id
,
191
int32_t idLength,
192
UTransDirection
dir,
193
const
UChar
*rules,
194
int32_t rulesLength,
195
UParseError
*parseError,
196
UErrorCode
*pErrorCode);
197
213
U_STABLE
UTransliterator
* U_EXPORT2
214
utrans_openInverse
(
const
UTransliterator
* trans,
215
UErrorCode
* status);
216
227
U_STABLE
UTransliterator
* U_EXPORT2
228
utrans_clone
(
const
UTransliterator
* trans,
229
UErrorCode
* status);
230
237
U_STABLE
void
U_EXPORT2
238
utrans_close
(
UTransliterator
* trans);
239
240
#if U_SHOW_CPLUSPLUS_API
241
242
U_NAMESPACE_BEGIN
243
253
U_DEFINE_LOCAL_OPEN_POINTER
(
LocalUTransliteratorPointer
,
UTransliterator
,
utrans_close
);
254
255
U_NAMESPACE_END
256
257
#endif
258
273
U_STABLE
const
UChar
* U_EXPORT2
274
utrans_getUnicodeID
(
const
UTransliterator
*trans,
275
int32_t *resultLength);
276
291
U_STABLE
void
U_EXPORT2
292
utrans_register
(
UTransliterator
* adoptedTrans,
293
UErrorCode
* status);
294
304
U_STABLE
void
U_EXPORT2
305
utrans_unregisterID
(
const
UChar
*
id
, int32_t idLength);
306
325
U_STABLE
void
U_EXPORT2
326
utrans_setFilter
(
UTransliterator
* trans,
327
const
UChar
* filterPattern,
328
int32_t filterPatternLen,
329
UErrorCode
* status);
330
338
U_STABLE
int32_t U_EXPORT2
339
utrans_countAvailableIDs
(
void
);
340
350
U_STABLE
UEnumeration
* U_EXPORT2
351
utrans_openIDs
(
UErrorCode
*pErrorCode);
352
353
/********************************************************************
354
* Transliteration API
355
********************************************************************/
356
380
U_STABLE
void
U_EXPORT2
381
utrans_trans
(
const
UTransliterator
* trans,
382
UReplaceable
* rep,
383
UReplaceableCallbacks
* repFunc,
384
int32_t start,
385
int32_t* limit,
386
UErrorCode
* status);
387
431
U_STABLE
void
U_EXPORT2
432
utrans_transIncremental
(
const
UTransliterator
* trans,
433
UReplaceable
* rep,
434
UReplaceableCallbacks
* repFunc,
435
UTransPosition
* pos,
436
UErrorCode
* status);
437
469
U_STABLE
void
U_EXPORT2
470
utrans_transUChars
(
const
UTransliterator
* trans,
471
UChar
* text,
472
int32_t* textLength,
473
int32_t textCapacity,
474
int32_t start,
475
int32_t* limit,
476
UErrorCode
* status);
477
504
U_STABLE
void
U_EXPORT2
505
utrans_transIncrementalUChars
(
const
UTransliterator
* trans,
506
UChar
* text,
507
int32_t* textLength,
508
int32_t textCapacity,
509
UTransPosition
* pos,
510
UErrorCode
* status);
511
512
#ifndef U_HIDE_DRAFT_API
513
530
U_DRAFT
int32_t U_EXPORT2
531
utrans_toRules
(
const
UTransliterator
* trans,
532
UBool
escapeUnprintable,
533
UChar
* result, int32_t resultLength,
534
UErrorCode
* status);
535
555
U_DRAFT
USet
* U_EXPORT2
556
utrans_getSourceSet
(
const
UTransliterator
* trans,
557
UBool
ignoreFilter,
558
USet
* fillIn,
559
UErrorCode
* status);
560
#endif
/* U_HIDE_DRAFT_API */
561
562
/* deprecated API ----------------------------------------------------------- */
563
564
#ifndef U_HIDE_DEPRECATED_API
565
566
/* see utrans.h documentation for why these functions are deprecated */
567
591
U_DEPRECATED
UTransliterator
* U_EXPORT2
592
utrans_open
(
const
char
*
id
,
593
UTransDirection
dir,
594
const
UChar
* rules,
/* may be Null */
595
int32_t rulesLength,
/* -1 if null-terminated */
596
UParseError
* parseError,
/* may be Null */
597
UErrorCode
* status);
598
614
U_DEPRECATED
int32_t U_EXPORT2
615
utrans_getID
(
const
UTransliterator
* trans,
616
char
* buf,
617
int32_t bufCapacity);
618
628
U_DEPRECATED
void
U_EXPORT2
629
utrans_unregister
(
const
char
*
id
);
630
649
U_DEPRECATED
int32_t U_EXPORT2
650
utrans_getAvailableID
(int32_t index,
651
char
* buf,
652
int32_t bufCapacity);
653
654
#endif
/* U_HIDE_DEPRECATED_API */
655
656
#endif
/* #if !UCONFIG_NO_TRANSLITERATION */
657
658
#endif
Generated on Mon Sep 29 2014 13:32:06 for ICU 54.1 by
1.8.1.2