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/localpointer.h"
00019 #include "unicode/urep.h"
00020 #include "unicode/parseerr.h"
00021 #include "unicode/uenum.h"
00022
00023
00024
00025
00026
00056
00057
00058
00059
00067 typedef void* UTransliterator;
00068
00077 typedef enum UTransDirection {
00078
00085 UTRANS_FORWARD,
00086
00093 UTRANS_REVERSE
00094
00095 } UTransDirection;
00096
00119 typedef struct UTransPosition {
00120
00129 int32_t contextStart;
00130
00139 int32_t contextLimit;
00140
00148 int32_t start;
00149
00157 int32_t limit;
00158
00159 } UTransPosition;
00160
00161
00162
00163
00164
00188 U_STABLE UTransliterator* U_EXPORT2
00189 utrans_openU(const UChar *id,
00190 int32_t idLength,
00191 UTransDirection dir,
00192 const UChar *rules,
00193 int32_t rulesLength,
00194 UParseError *parseError,
00195 UErrorCode *pErrorCode);
00196
00212 U_STABLE UTransliterator* U_EXPORT2
00213 utrans_openInverse(const UTransliterator* trans,
00214 UErrorCode* status);
00215
00226 U_STABLE UTransliterator* U_EXPORT2
00227 utrans_clone(const UTransliterator* trans,
00228 UErrorCode* status);
00229
00236 U_STABLE void U_EXPORT2
00237 utrans_close(UTransliterator* trans);
00238
00239 #if U_SHOW_CPLUSPLUS_API
00240
00241 U_NAMESPACE_BEGIN
00242
00252 U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close);
00253
00254 U_NAMESPACE_END
00255
00256 #endif
00257
00272 U_STABLE const UChar * U_EXPORT2
00273 utrans_getUnicodeID(const UTransliterator *trans,
00274 int32_t *resultLength);
00275
00290 U_STABLE void U_EXPORT2
00291 utrans_register(UTransliterator* adoptedTrans,
00292 UErrorCode* status);
00293
00303 U_STABLE void U_EXPORT2
00304 utrans_unregisterID(const UChar* id, int32_t idLength);
00305
00324 U_STABLE void U_EXPORT2
00325 utrans_setFilter(UTransliterator* trans,
00326 const UChar* filterPattern,
00327 int32_t filterPatternLen,
00328 UErrorCode* status);
00329
00337 U_STABLE int32_t U_EXPORT2
00338 utrans_countAvailableIDs(void);
00339
00349 U_STABLE UEnumeration * U_EXPORT2
00350 utrans_openIDs(UErrorCode *pErrorCode);
00351
00352
00353
00354
00355
00379 U_STABLE void U_EXPORT2
00380 utrans_trans(const UTransliterator* trans,
00381 UReplaceable* rep,
00382 UReplaceableCallbacks* repFunc,
00383 int32_t start,
00384 int32_t* limit,
00385 UErrorCode* status);
00386
00430 U_STABLE void U_EXPORT2
00431 utrans_transIncremental(const UTransliterator* trans,
00432 UReplaceable* rep,
00433 UReplaceableCallbacks* repFunc,
00434 UTransPosition* pos,
00435 UErrorCode* status);
00436
00468 U_STABLE void U_EXPORT2
00469 utrans_transUChars(const UTransliterator* trans,
00470 UChar* text,
00471 int32_t* textLength,
00472 int32_t textCapacity,
00473 int32_t start,
00474 int32_t* limit,
00475 UErrorCode* status);
00476
00503 U_STABLE void U_EXPORT2
00504 utrans_transIncrementalUChars(const UTransliterator* trans,
00505 UChar* text,
00506 int32_t* textLength,
00507 int32_t textCapacity,
00508 UTransPosition* pos,
00509 UErrorCode* status);
00510
00511
00512
00513 #ifndef U_HIDE_DEPRECATED_API
00514
00515
00516
00540 U_DEPRECATED UTransliterator* U_EXPORT2
00541 utrans_open(const char* id,
00542 UTransDirection dir,
00543 const UChar* rules,
00544 int32_t rulesLength,
00545 UParseError* parseError,
00546 UErrorCode* status);
00547
00563 U_DEPRECATED int32_t U_EXPORT2
00564 utrans_getID(const UTransliterator* trans,
00565 char* buf,
00566 int32_t bufCapacity);
00567
00577 U_DEPRECATED void U_EXPORT2
00578 utrans_unregister(const char* id);
00579
00598 U_DEPRECATED int32_t U_EXPORT2
00599 utrans_getAvailableID(int32_t index,
00600 char* buf,
00601 int32_t bufCapacity);
00602
00603 #endif
00604
00605 #endif
00606
00607 #endif