ICU 50.1.2  50.1.2
utrans.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 1997-2011, 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 
86 
94 
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 
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
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
238 
239 #if U_SHOW_CPLUSPLUS_API
240 
242 
253 
255 
256 #endif
257 
272 U_STABLE const UChar * U_EXPORT2
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
326  const UChar* filterPattern,
327  int32_t filterPatternLen,
328  UErrorCode* status);
329 
337 U_STABLE int32_t U_EXPORT2
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
432  UReplaceable* rep,
433  UReplaceableCallbacks* repFunc,
434  UTransPosition* pos,
435  UErrorCode* status);
436 
468 U_STABLE void U_EXPORT2
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
505  UChar* text,
506  int32_t* textLength,
507  int32_t textCapacity,
508  UTransPosition* pos,
509  UErrorCode* status);
510 
511 /* deprecated API ----------------------------------------------------------- */
512 
513 #ifndef U_HIDE_DEPRECATED_API
514 
515 /* see utrans.h documentation for why these functions are deprecated */
516 
540 U_DEPRECATED UTransliterator* U_EXPORT2
541 utrans_open(const char* id,
542  UTransDirection dir,
543  const UChar* rules, /* may be Null */
544  int32_t rulesLength, /* -1 if null-terminated */
545  UParseError* parseError, /* may be Null */
546  UErrorCode* status);
547 
563 U_DEPRECATED int32_t U_EXPORT2
564 utrans_getID(const UTransliterator* trans,
565  char* buf,
566  int32_t bufCapacity);
567 
577 U_DEPRECATED void U_EXPORT2
578 utrans_unregister(const char* id);
579 
598 U_DEPRECATED int32_t U_EXPORT2
599 utrans_getAvailableID(int32_t index,
600  char* buf,
601  int32_t bufCapacity);
602 
603 #endif /* U_HIDE_DEPRECATED_API */
604 
605 #endif /* #if !UCONFIG_NO_TRANSLITERATION */
606 
607 #endif