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-2001, 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 #include "unicode/urep.h" 00016 #include "unicode/parseerr.h" 00017 00018 /******************************************************************** 00019 * General Notes 00020 ******************************************************************** 00021 */ 00039 /******************************************************************** 00040 * Data Structures 00041 ********************************************************************/ 00042 00050 typedef void* UTransliterator; 00051 00060 typedef enum _UTransDirection { 00061 00068 UTRANS_FORWARD, 00069 00076 UTRANS_REVERSE 00077 00078 } UTransDirection; 00079 00102 typedef struct _UTransPosition { 00103 00111 int32_t contextStart; 00112 00120 int32_t contextLimit; 00121 00128 int32_t start; 00129 00136 int32_t limit; 00137 00138 } UTransPosition; 00139 00140 /******************************************************************** 00141 * General API 00142 ********************************************************************/ 00143 00167 U_CAPI UTransliterator* U_EXPORT2 00168 utrans_open(const char* id, 00169 UTransDirection dir, 00170 const UChar* rules, /* may be Null */ 00171 int32_t rulesLength, /* -1 if null-terminated */ 00172 UParseError* parseError, /* may be Null */ 00173 UErrorCode* status); 00174 00190 U_CAPI UTransliterator* U_EXPORT2 00191 utrans_openInverse(const UTransliterator* trans, 00192 UErrorCode* status); 00193 00204 U_CAPI UTransliterator* U_EXPORT2 00205 utrans_clone(const UTransliterator* trans, 00206 UErrorCode* status); 00207 00213 U_CAPI void U_EXPORT2 00214 utrans_close(UTransliterator* trans); 00215 00230 U_CAPI int32_t U_EXPORT2 00231 utrans_getID(const UTransliterator* trans, 00232 char* buf, 00233 int32_t bufCapacity); 00234 00249 U_CAPI void U_EXPORT2 00250 utrans_register(UTransliterator* adoptedTrans, 00251 UErrorCode* status); 00252 00261 U_CAPI void U_EXPORT2 00262 utrans_unregister(const char* id); 00263 00282 U_CAPI void U_EXPORT2 00283 utrans_setFilter(UTransliterator* trans, 00284 const UChar* filterPattern, 00285 int32_t filterPatternLen, 00286 UErrorCode* status); 00287 00292 U_CAPI int32_t U_EXPORT2 00293 utrans_countAvailableIDs(void); 00294 00312 U_CAPI int32_t U_EXPORT2 00313 utrans_getAvailableID(int32_t index, 00314 char* buf, 00315 int32_t bufCapacity); 00316 00317 /******************************************************************** 00318 * Transliteration API 00319 ********************************************************************/ 00320 00344 U_CAPI void U_EXPORT2 00345 utrans_trans(const UTransliterator* trans, 00346 UReplaceable* rep, 00347 UReplaceableCallbacks* repFunc, 00348 int32_t start, 00349 int32_t* limit, 00350 UErrorCode* status); 00351 00395 U_CAPI void U_EXPORT2 00396 utrans_transIncremental(const UTransliterator* trans, 00397 UReplaceable* rep, 00398 UReplaceableCallbacks* repFunc, 00399 UTransPosition* pos, 00400 UErrorCode* status); 00401 00433 U_CAPI void U_EXPORT2 00434 utrans_transUChars(const UTransliterator* trans, 00435 UChar* text, 00436 int32_t* textLength, 00437 int32_t textCapacity, 00438 int32_t start, 00439 int32_t* limit, 00440 UErrorCode* status); 00441 00468 U_CAPI void U_EXPORT2 00469 utrans_transIncrementalUChars(const UTransliterator* trans, 00470 UChar* text, 00471 int32_t* textLength, 00472 int32_t textCapacity, 00473 UTransPosition* pos, 00474 UErrorCode* status); 00475 00476 00477 /********************* Deprecated API ************************************/ 00482 #ifdef U_USE_DEPRECATED_FORMAT_API 00483 00484 #if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM !=1)) 00485 # error "ICU version has changed. Please redefine the macros under U_USE_DEPRECATED_FORMAT_API pre-processor definition" 00486 #else 00487 U_CAPI UTransliterator* U_EXPORT2 00488 utrans_openRules(const char* id, 00489 const UChar* rules, 00490 int32_t rulesLength, /* -1 if null-terminated */ 00491 UTransDirection dir, 00492 UParseError* parseErr, /* may be NULL */ 00493 UErrorCode* status){ 00494 return utrans_open(id,dir,rules,rulesLength,parseErr,status); 00495 } 00496 00497 # define utrans_open_2_1(id,dir,status) utrans_open(id,dir,NULL,0,NULL,status) 00498 00499 #endif 00500 #endif 00501 /********************* End **********************************************/ 00502 00503 #endif

Generated on Wed Jul 28 05:45:13 2004 for ICU 2.1 by doxygen 1.3.7