00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef UTRANS_H
00014 #define UTRANS_H
00015
00016 #include "unicode/utypes.h"
00017
00018 #if !UCONFIG_NO_TRANSLITERATION
00019
00020 #include "unicode/localpointer.h"
00021 #include "unicode/urep.h"
00022 #include "unicode/parseerr.h"
00023 #include "unicode/uenum.h"
00024 #include "unicode/uset.h"
00025
00026
00027
00028
00029
00059
00060
00061
00062
00070 typedef void* UTransliterator;
00071
00080 typedef enum UTransDirection {
00081
00088 UTRANS_FORWARD,
00089
00096 UTRANS_REVERSE
00097
00098 } UTransDirection;
00099
00122 typedef struct UTransPosition {
00123
00132 int32_t contextStart;
00133
00142 int32_t contextLimit;
00143
00151 int32_t start;
00152
00160 int32_t limit;
00161
00162 } UTransPosition;
00163
00164
00165
00166
00167
00191 U_STABLE UTransliterator* U_EXPORT2
00192 utrans_openU(const UChar *id,
00193 int32_t idLength,
00194 UTransDirection dir,
00195 const UChar *rules,
00196 int32_t rulesLength,
00197 UParseError *parseError,
00198 UErrorCode *pErrorCode);
00199
00215 U_STABLE UTransliterator* U_EXPORT2
00216 utrans_openInverse(const UTransliterator* trans,
00217 UErrorCode* status);
00218
00229 U_STABLE UTransliterator* U_EXPORT2
00230 utrans_clone(const UTransliterator* trans,
00231 UErrorCode* status);
00232
00239 U_STABLE void U_EXPORT2
00240 utrans_close(UTransliterator* trans);
00241
00242 #if U_SHOW_CPLUSPLUS_API
00243
00244 U_NAMESPACE_BEGIN
00245
00255 U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close);
00256
00257 U_NAMESPACE_END
00258
00259 #endif
00260
00275 U_STABLE const UChar * U_EXPORT2
00276 utrans_getUnicodeID(const UTransliterator *trans,
00277 int32_t *resultLength);
00278
00293 U_STABLE void U_EXPORT2
00294 utrans_register(UTransliterator* adoptedTrans,
00295 UErrorCode* status);
00296
00306 U_STABLE void U_EXPORT2
00307 utrans_unregisterID(const UChar* id, int32_t idLength);
00308
00327 U_STABLE void U_EXPORT2
00328 utrans_setFilter(UTransliterator* trans,
00329 const UChar* filterPattern,
00330 int32_t filterPatternLen,
00331 UErrorCode* status);
00332
00340 U_STABLE int32_t U_EXPORT2
00341 utrans_countAvailableIDs(void);
00342
00352 U_STABLE UEnumeration * U_EXPORT2
00353 utrans_openIDs(UErrorCode *pErrorCode);
00354
00355
00356
00357
00358
00382 U_STABLE void U_EXPORT2
00383 utrans_trans(const UTransliterator* trans,
00384 UReplaceable* rep,
00385 UReplaceableCallbacks* repFunc,
00386 int32_t start,
00387 int32_t* limit,
00388 UErrorCode* status);
00389
00433 U_STABLE void U_EXPORT2
00434 utrans_transIncremental(const UTransliterator* trans,
00435 UReplaceable* rep,
00436 UReplaceableCallbacks* repFunc,
00437 UTransPosition* pos,
00438 UErrorCode* status);
00439
00471 U_STABLE void U_EXPORT2
00472 utrans_transUChars(const UTransliterator* trans,
00473 UChar* text,
00474 int32_t* textLength,
00475 int32_t textCapacity,
00476 int32_t start,
00477 int32_t* limit,
00478 UErrorCode* status);
00479
00506 U_STABLE void U_EXPORT2
00507 utrans_transIncrementalUChars(const UTransliterator* trans,
00508 UChar* text,
00509 int32_t* textLength,
00510 int32_t textCapacity,
00511 UTransPosition* pos,
00512 UErrorCode* status);
00513
00531 U_STABLE int32_t U_EXPORT2
00532 utrans_toRules( const UTransliterator* trans,
00533 UBool escapeUnprintable,
00534 UChar* result, int32_t resultLength,
00535 UErrorCode* status);
00536
00556 U_STABLE USet* U_EXPORT2
00557 utrans_getSourceSet(const UTransliterator* trans,
00558 UBool ignoreFilter,
00559 USet* fillIn,
00560 UErrorCode* status);
00561
00562
00563
00564 #ifndef U_HIDE_DEPRECATED_API
00565
00566
00567
00591 U_DEPRECATED UTransliterator* U_EXPORT2
00592 utrans_open(const char* id,
00593 UTransDirection dir,
00594 const UChar* rules,
00595 int32_t rulesLength,
00596 UParseError* parseError,
00597 UErrorCode* status);
00598
00614 U_DEPRECATED int32_t U_EXPORT2
00615 utrans_getID(const UTransliterator* trans,
00616 char* buf,
00617 int32_t bufCapacity);
00618
00628 U_DEPRECATED void U_EXPORT2
00629 utrans_unregister(const char* id);
00630
00649 U_DEPRECATED int32_t U_EXPORT2
00650 utrans_getAvailableID(int32_t index,
00651 char* buf,
00652 int32_t bufCapacity);
00653
00654 #endif
00655
00656 #endif
00657
00658 #endif