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_CAPI 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_CAPI UTransliterator* U_EXPORT2
00212 utrans_openInverse(const UTransliterator* trans,
00213 UErrorCode* status);
00214
00225 U_CAPI UTransliterator* U_EXPORT2
00226 utrans_clone(const UTransliterator* trans,
00227 UErrorCode* status);
00228
00235 U_CAPI void U_EXPORT2
00236 utrans_close(UTransliterator* trans);
00237
00251 U_CAPI const UChar * U_EXPORT2
00252 utrans_getUnicodeID(const UTransliterator *trans,
00253 int32_t *resultLength);
00254
00269 U_CAPI void U_EXPORT2
00270 utrans_register(UTransliterator* adoptedTrans,
00271 UErrorCode* status);
00272
00282 U_CAPI void U_EXPORT2
00283 utrans_unregisterID(const UChar* id, int32_t idLength);
00284
00303 U_CAPI void U_EXPORT2
00304 utrans_setFilter(UTransliterator* trans,
00305 const UChar* filterPattern,
00306 int32_t filterPatternLen,
00307 UErrorCode* status);
00308
00316 U_CAPI int32_t U_EXPORT2
00317 utrans_countAvailableIDs(void);
00318
00328 U_CAPI UEnumeration * U_EXPORT2
00329 utrans_openIDs(UErrorCode *pErrorCode);
00330
00331
00332
00333
00334
00358 U_CAPI void U_EXPORT2
00359 utrans_trans(const UTransliterator* trans,
00360 UReplaceable* rep,
00361 UReplaceableCallbacks* repFunc,
00362 int32_t start,
00363 int32_t* limit,
00364 UErrorCode* status);
00365
00409 U_CAPI void U_EXPORT2
00410 utrans_transIncremental(const UTransliterator* trans,
00411 UReplaceable* rep,
00412 UReplaceableCallbacks* repFunc,
00413 UTransPosition* pos,
00414 UErrorCode* status);
00415
00447 U_CAPI void U_EXPORT2
00448 utrans_transUChars(const UTransliterator* trans,
00449 UChar* text,
00450 int32_t* textLength,
00451 int32_t textCapacity,
00452 int32_t start,
00453 int32_t* limit,
00454 UErrorCode* status);
00455
00482 U_CAPI void U_EXPORT2
00483 utrans_transIncrementalUChars(const UTransliterator* trans,
00484 UChar* text,
00485 int32_t* textLength,
00486 int32_t textCapacity,
00487 UTransPosition* pos,
00488 UErrorCode* status);
00489
00490
00491
00492
00493
00517 U_CAPI UTransliterator* U_EXPORT2
00518 utrans_open(const char* id,
00519 UTransDirection dir,
00520 const UChar* rules,
00521 int32_t rulesLength,
00522 UParseError* parseError,
00523 UErrorCode* status);
00524
00540 U_CAPI int32_t U_EXPORT2
00541 utrans_getID(const UTransliterator* trans,
00542 char* buf,
00543 int32_t bufCapacity);
00544
00554 U_CAPI void U_EXPORT2
00555 utrans_unregister(const char* id);
00556
00575 U_CAPI int32_t U_EXPORT2
00576 utrans_getAvailableID(int32_t index,
00577 char* buf,
00578 int32_t bufCapacity);
00579
00580 #endif
00581
00582 #endif