Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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 
00096 typedef struct _UTransPosition {
00097 
00105     int32_t contextStart;
00106     
00114     int32_t contextLimit;
00115     
00122     int32_t start;
00123     
00130     int32_t limit;
00131 
00132 } UTransPosition;
00133 
00134 /********************************************************************
00135  * General API
00136  ********************************************************************/
00137 
00149 U_CAPI UTransliterator*
00150 utrans_open(const char* id,
00151             UTransDirection dir,
00152             UErrorCode* status);
00153 
00175 U_CAPI UTransliterator*
00176 utrans_openRules(const char* id,
00177                  const UChar* rules,
00178                  int32_t rulesLength, /* -1 if null-terminated */
00179                  UTransDirection dir,
00180                  UParseError* parseErr, /* may be NULL */
00181                  UErrorCode* status);
00182 
00198 U_CAPI UTransliterator*
00199 utrans_openInverse(const UTransliterator* trans,
00200                    UErrorCode* status);
00201 
00212 U_CAPI UTransliterator*
00213 utrans_clone(const UTransliterator* trans,
00214              UErrorCode* status);
00215 
00221 U_CAPI void
00222 utrans_close(UTransliterator* trans);
00223 
00238 U_CAPI int32_t
00239 utrans_getID(const UTransliterator* trans,
00240              char* buf,
00241              int32_t bufCapacity);
00242 
00257 U_CAPI void
00258 utrans_register(UTransliterator* adoptedTrans,
00259                 UErrorCode* status);
00260 
00269 U_CAPI void
00270 utrans_unregister(const char* id);
00271 
00290 U_CAPI void
00291 utrans_setFilter(UTransliterator* trans,
00292                  const UChar* filterPattern,
00293                  int32_t filterPatternLen,
00294                  UErrorCode* status);
00295 
00300 U_CAPI int32_t
00301 utrans_countAvailableIDs(void);
00302 
00320 U_CAPI int32_t
00321 utrans_getAvailableID(int32_t index,
00322                       char* buf,
00323                       int32_t bufCapacity);
00324 
00325 /********************************************************************
00326  * Transliteration API
00327  ********************************************************************/
00328 
00352 U_CAPI void
00353 utrans_trans(const UTransliterator* trans,
00354              UReplaceable* rep,
00355              UReplaceableCallbacks* repFunc,
00356              int32_t start,
00357              int32_t* limit,
00358              UErrorCode* status);
00359 
00403 U_CAPI void
00404 utrans_transIncremental(const UTransliterator* trans,
00405                         UReplaceable* rep,
00406                         UReplaceableCallbacks* repFunc,
00407                         UTransPosition* pos,
00408                         UErrorCode* status);
00409 
00441 U_CAPI void
00442 utrans_transUChars(const UTransliterator* trans,
00443                    UChar* text,
00444                    int32_t* textLength,
00445                    int32_t textCapacity,
00446                    int32_t start,
00447                    int32_t* limit,
00448                    UErrorCode* status);
00449 
00476 U_CAPI void
00477 utrans_transIncrementalUChars(const UTransliterator* trans,
00478                               UChar* text,
00479                               int32_t* textLength,
00480                               int32_t textCapacity,
00481                               UTransPosition* pos,
00482                               UErrorCode* status);
00483 
00484 #endif

Generated at Thu Mar 22 16:12:43 2001 for ICU 1.8 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000