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 #include "unicode/urep.h"
00016 #include "unicode/parseerr.h"
00017
00018
00019
00020
00021
00039
00040
00041
00042
00050 typedef void* UTransliterator;
00051
00060 typedef enum _UTransDirection {
00061
00068 UTRANS_FORWARD,
00069
00076 UTRANS_REVERSE
00077
00078 } UTransDirection;
00079
00096 typedef struct _UTransPosition {
00097
00104 int32_t contextStart;
00105
00113 int32_t contextLimit;
00114
00121 int32_t start;
00122
00129 int32_t limit;
00130
00131 } UTransPosition;
00132
00133
00134
00135
00136
00148 U_CAPI UTransliterator*
00149 utrans_open(const char* id,
00150 UTransDirection dir,
00151 UErrorCode* status);
00152
00174 U_CAPI UTransliterator*
00175 utrans_openRules(const char* id,
00176 const UChar* rules,
00177 int32_t rulesLength,
00178 UTransDirection dir,
00179 UParseError* parseErr,
00180 UErrorCode* status);
00181
00197 U_CAPI UTransliterator*
00198 utrans_openInverse(const UTransliterator* trans,
00199 UErrorCode* status);
00200
00211 U_CAPI UTransliterator*
00212 utrans_clone(const UTransliterator* trans,
00213 UErrorCode* status);
00214
00220 U_CAPI void
00221 utrans_close(UTransliterator* trans);
00222
00237 U_CAPI int32_t
00238 utrans_getID(const UTransliterator* trans,
00239 char* buf,
00240 int32_t bufCapacity);
00241
00256 U_CAPI void
00257 utrans_register(UTransliterator* adoptedTrans,
00258 UErrorCode* status);
00259
00268 U_CAPI void
00269 utrans_unregister(const char* id);
00270
00289 U_CAPI void
00290 utrans_setFilter(UTransliterator* trans,
00291 const UChar* filterPattern,
00292 int32_t filterPatternLen,
00293 UErrorCode* status);
00294
00299 U_CAPI int32_t
00300 utrans_countAvailableIDs(void);
00301
00319 U_CAPI int32_t
00320 utrans_getAvailableID(int32_t index,
00321 char* buf,
00322 int32_t bufCapacity);
00323
00324
00325
00326
00327
00351 U_CAPI void
00352 utrans_trans(const UTransliterator* trans,
00353 UReplaceable* rep,
00354 UReplaceableCallbacks* repFunc,
00355 int32_t start,
00356 int32_t* limit,
00357 UErrorCode* status);
00358
00402 U_CAPI void
00403 utrans_transIncremental(const UTransliterator* trans,
00404 UReplaceable* rep,
00405 UReplaceableCallbacks* repFunc,
00406 UTransPosition* pos,
00407 UErrorCode* status);
00408
00440 U_CAPI void
00441 utrans_transUChars(const UTransliterator* trans,
00442 UChar* text,
00443 int32_t* textLength,
00444 int32_t textCapacity,
00445 int32_t start,
00446 int32_t* limit,
00447 UErrorCode* status);
00448
00475 U_CAPI void
00476 utrans_transIncrementalUChars(const UTransliterator* trans,
00477 UChar* text,
00478 int32_t* textLength,
00479 int32_t textCapacity,
00480 UTransPosition* pos,
00481 UErrorCode* status);
00482
00483 #endif