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 #include "unicode/uset.h"
00023
00024
00025
00026
00027
00057
00058
00059
00060
00068 typedef void* UTransliterator;
00069
00078 typedef enum UTransDirection {
00079
00086 UTRANS_FORWARD,
00087
00094 UTRANS_REVERSE
00095
00096 } UTransDirection;
00097
00120 typedef struct UTransPosition {
00121
00130 int32_t contextStart;
00131
00140 int32_t contextLimit;
00141
00149 int32_t start;
00150
00158 int32_t limit;
00159
00160 } UTransPosition;
00161
00162
00163
00164
00165
00189 U_STABLE UTransliterator* U_EXPORT2
00190 utrans_openU(const UChar *id,
00191 int32_t idLength,
00192 UTransDirection dir,
00193 const UChar *rules,
00194 int32_t rulesLength,
00195 UParseError *parseError,
00196 UErrorCode *pErrorCode);
00197
00213 U_STABLE UTransliterator* U_EXPORT2
00214 utrans_openInverse(const UTransliterator* trans,
00215 UErrorCode* status);
00216
00227 U_STABLE UTransliterator* U_EXPORT2
00228 utrans_clone(const UTransliterator* trans,
00229 UErrorCode* status);
00230
00237 U_STABLE void U_EXPORT2
00238 utrans_close(UTransliterator* trans);
00239
00240 #if U_SHOW_CPLUSPLUS_API
00241
00242 U_NAMESPACE_BEGIN
00243
00253 U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close);
00254
00255 U_NAMESPACE_END
00256
00257 #endif
00258
00273 U_STABLE const UChar * U_EXPORT2
00274 utrans_getUnicodeID(const UTransliterator *trans,
00275 int32_t *resultLength);
00276
00291 U_STABLE void U_EXPORT2
00292 utrans_register(UTransliterator* adoptedTrans,
00293 UErrorCode* status);
00294
00304 U_STABLE void U_EXPORT2
00305 utrans_unregisterID(const UChar* id, int32_t idLength);
00306
00325 U_STABLE void U_EXPORT2
00326 utrans_setFilter(UTransliterator* trans,
00327 const UChar* filterPattern,
00328 int32_t filterPatternLen,
00329 UErrorCode* status);
00330
00338 U_STABLE int32_t U_EXPORT2
00339 utrans_countAvailableIDs(void);
00340
00350 U_STABLE UEnumeration * U_EXPORT2
00351 utrans_openIDs(UErrorCode *pErrorCode);
00352
00353
00354
00355
00356
00380 U_STABLE void U_EXPORT2
00381 utrans_trans(const UTransliterator* trans,
00382 UReplaceable* rep,
00383 UReplaceableCallbacks* repFunc,
00384 int32_t start,
00385 int32_t* limit,
00386 UErrorCode* status);
00387
00431 U_STABLE void U_EXPORT2
00432 utrans_transIncremental(const UTransliterator* trans,
00433 UReplaceable* rep,
00434 UReplaceableCallbacks* repFunc,
00435 UTransPosition* pos,
00436 UErrorCode* status);
00437
00469 U_STABLE void U_EXPORT2
00470 utrans_transUChars(const UTransliterator* trans,
00471 UChar* text,
00472 int32_t* textLength,
00473 int32_t textCapacity,
00474 int32_t start,
00475 int32_t* limit,
00476 UErrorCode* status);
00477
00504 U_STABLE void U_EXPORT2
00505 utrans_transIncrementalUChars(const UTransliterator* trans,
00506 UChar* text,
00507 int32_t* textLength,
00508 int32_t textCapacity,
00509 UTransPosition* pos,
00510 UErrorCode* status);
00511
00529 U_STABLE int32_t U_EXPORT2
00530 utrans_toRules( const UTransliterator* trans,
00531 UBool escapeUnprintable,
00532 UChar* result, int32_t resultLength,
00533 UErrorCode* status);
00534
00554 U_STABLE USet* U_EXPORT2
00555 utrans_getSourceSet(const UTransliterator* trans,
00556 UBool ignoreFilter,
00557 USet* fillIn,
00558 UErrorCode* status);
00559
00560
00561
00562 #ifndef U_HIDE_DEPRECATED_API
00563
00564
00565
00589 U_DEPRECATED UTransliterator* U_EXPORT2
00590 utrans_open(const char* id,
00591 UTransDirection dir,
00592 const UChar* rules,
00593 int32_t rulesLength,
00594 UParseError* parseError,
00595 UErrorCode* status);
00596
00612 U_DEPRECATED int32_t U_EXPORT2
00613 utrans_getID(const UTransliterator* trans,
00614 char* buf,
00615 int32_t bufCapacity);
00616
00626 U_DEPRECATED void U_EXPORT2
00627 utrans_unregister(const char* id);
00628
00647 U_DEPRECATED int32_t U_EXPORT2
00648 utrans_getAvailableID(int32_t index,
00649 char* buf,
00650 int32_t bufCapacity);
00651
00652 #endif
00653
00654 #endif
00655
00656 #endif