00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef UTRANS_H
00012 #define UTRANS_H
00013
00014 #include "unicode/utypes.h"
00015
00016 #if !UCONFIG_NO_TRANSLITERATION
00017
00018 #include "unicode/urep.h"
00019 #include "unicode/parseerr.h"
00020 #include "unicode/uenum.h"
00021
00022
00023
00024
00025
00055
00056
00057
00058
00066 typedef void* UTransliterator;
00067
00076 typedef enum UTransDirection {
00077
00084 UTRANS_FORWARD,
00085
00092 UTRANS_REVERSE
00093
00094 } UTransDirection;
00095
00118 typedef struct UTransPosition {
00119
00128 int32_t contextStart;
00129
00138 int32_t contextLimit;
00139
00147 int32_t start;
00148
00156 int32_t limit;
00157
00158 } UTransPosition;
00159
00160
00161
00162
00163
00187 U_STABLE UTransliterator* U_EXPORT2
00188 utrans_openU(const UChar *id,
00189 int32_t idLength,
00190 UTransDirection dir,
00191 const UChar *rules,
00192 int32_t rulesLength,
00193 UParseError *parseError,
00194 UErrorCode *pErrorCode);
00195
00211 U_STABLE UTransliterator* U_EXPORT2
00212 utrans_openInverse(const UTransliterator* trans,
00213 UErrorCode* status);
00214
00225 U_STABLE UTransliterator* U_EXPORT2
00226 utrans_clone(const UTransliterator* trans,
00227 UErrorCode* status);
00228
00235 U_STABLE void U_EXPORT2
00236 utrans_close(UTransliterator* trans);
00237
00252 U_STABLE const UChar * U_EXPORT2
00253 utrans_getUnicodeID(const UTransliterator *trans,
00254 int32_t *resultLength);
00255
00270 U_STABLE void U_EXPORT2
00271 utrans_register(UTransliterator* adoptedTrans,
00272 UErrorCode* status);
00273
00283 U_STABLE void U_EXPORT2
00284 utrans_unregisterID(const UChar* id, int32_t idLength);
00285
00304 U_STABLE void U_EXPORT2
00305 utrans_setFilter(UTransliterator* trans,
00306 const UChar* filterPattern,
00307 int32_t filterPatternLen,
00308 UErrorCode* status);
00309
00317 U_STABLE int32_t U_EXPORT2
00318 utrans_countAvailableIDs(void);
00319
00329 U_STABLE UEnumeration * U_EXPORT2
00330 utrans_openIDs(UErrorCode *pErrorCode);
00331
00332
00333
00334
00335
00359 U_STABLE void U_EXPORT2
00360 utrans_trans(const UTransliterator* trans,
00361 UReplaceable* rep,
00362 UReplaceableCallbacks* repFunc,
00363 int32_t start,
00364 int32_t* limit,
00365 UErrorCode* status);
00366
00410 U_STABLE void U_EXPORT2
00411 utrans_transIncremental(const UTransliterator* trans,
00412 UReplaceable* rep,
00413 UReplaceableCallbacks* repFunc,
00414 UTransPosition* pos,
00415 UErrorCode* status);
00416
00448 U_STABLE void U_EXPORT2
00449 utrans_transUChars(const UTransliterator* trans,
00450 UChar* text,
00451 int32_t* textLength,
00452 int32_t textCapacity,
00453 int32_t start,
00454 int32_t* limit,
00455 UErrorCode* status);
00456
00483 U_STABLE void U_EXPORT2
00484 utrans_transIncrementalUChars(const UTransliterator* trans,
00485 UChar* text,
00486 int32_t* textLength,
00487 int32_t textCapacity,
00488 UTransPosition* pos,
00489 UErrorCode* status);
00490
00491
00492
00493
00494
00518 U_DEPRECATED UTransliterator* U_EXPORT2
00519 utrans_open(const char* id,
00520 UTransDirection dir,
00521 const UChar* rules,
00522 int32_t rulesLength,
00523 UParseError* parseError,
00524 UErrorCode* status);
00525
00541 U_DEPRECATED int32_t U_EXPORT2
00542 utrans_getID(const UTransliterator* trans,
00543 char* buf,
00544 int32_t bufCapacity);
00545
00555 U_DEPRECATED void U_EXPORT2
00556 utrans_unregister(const char* id);
00557
00576 U_DEPRECATED int32_t U_EXPORT2
00577 utrans_getAvailableID(int32_t index,
00578 char* buf,
00579 int32_t bufCapacity);
00580
00581 #endif
00582
00583 #endif