Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

utrans.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************* 00003 * Copyright (C) 1997-2003, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ******************************************************************************* 00006 * Date Name Description 00007 * 06/21/00 aliu Creation. 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 * General Notes 00024 ******************************************************************** 00025 */ 00055 /******************************************************************** 00056 * Data Structures 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 * General API 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 * Transliteration API 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 /* deprecated API ----------------------------------------------------------- */ 00491 00492 /* see utrans.h documentation for why these functions are deprecated */ 00493 00517 U_CAPI UTransliterator* U_EXPORT2 00518 utrans_open(const char* id, 00519 UTransDirection dir, 00520 const UChar* rules, /* may be Null */ 00521 int32_t rulesLength, /* -1 if null-terminated */ 00522 UParseError* parseError, /* may be Null */ 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 /* #if !UCONFIG_NO_TRANSLITERATION */ 00581 00582 #endif

Generated on Wed Sep 15 17:18:10 2004 for ICU 2.8 by doxygen 1.3.8