Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

utrans.h

This is the verbatim text of the utrans.h include file.
/*
*******************************************************************************
*   Copyright (C) 1997-2000, International Business Machines
*   Corporation and others.  All Rights Reserved.
*******************************************************************************
*   Date        Name        Description
*   06/21/00    aliu        Creation.
*******************************************************************************
*/

#ifndef UTRANS_H
#define UTRANS_H

#include "unicode/utypes.h"
#include "unicode/urep.h"
#include "unicode/parseerr.h"

/********************************************************************
 * General Notes
 ********************************************************************
 *
 * The data structures and functions described in this header provide
 * transliteration services.  Transliteration services are implemented
 * as C++ classes.  The comments and documentation in this header
 * assume the reader is familiar with the C++ headers translit.h and
 * rbt.h and associated documentation.
 *
 * A significant but incomplete subset of the C++ transliteration
 * services are available to C code through this header.  In order to
 * access more complex transliteration services, refer to the C++
 * headers and documentation.
 */

/********************************************************************
 * Data Structures
 ********************************************************************/

typedef void* UTransliterator;

typedef enum _UTransDirection {

    UTRANS_FORWARD,

    UTRANS_REVERSE

} UTransDirection;

typedef struct _UTransPosition {

    int32_t contextStart;
    
    int32_t contextLimit;
    
    int32_t start;
    
    int32_t limit;

} UTransPosition;

/********************************************************************
 * General API
 ********************************************************************/

U_CAPI UTransliterator*
utrans_open(const char* id,
            UTransDirection dir,
            UErrorCode* status);

U_CAPI UTransliterator*
utrans_openRules(const char* id,
                 const UChar* rules,
                 int32_t rulesLength, /* -1 if null-terminated */
                 UTransDirection dir,
                 UParseError* parseErr, /* may be NULL */
                 UErrorCode* status);

U_CAPI UTransliterator*
utrans_openInverse(const UTransliterator* trans,
                   UErrorCode* status);

U_CAPI UTransliterator*
utrans_clone(const UTransliterator* trans,
             UErrorCode* status);

U_CAPI void
utrans_close(UTransliterator* trans);

U_CAPI int32_t
utrans_getID(const UTransliterator* trans,
             char* buf,
             int32_t bufCapacity);

U_CAPI void
utrans_register(UTransliterator* adoptedTrans,
                UErrorCode* status);

U_CAPI void
utrans_unregister(const char* id);

U_CAPI void
utrans_setFilter(UTransliterator* trans,
                 const UChar* filterPattern,
                 int32_t filterPatternLen,
                 UErrorCode* status);

U_CAPI int32_t
utrans_countAvailableIDs(void);

U_CAPI int32_t
utrans_getAvailableID(int32_t index,
                      char* buf,
                      int32_t bufCapacity);

/********************************************************************
 * Transliteration API
 ********************************************************************/

U_CAPI void
utrans_trans(const UTransliterator* trans,
             UReplaceable* rep,
             UReplaceableCallbacks* repFunc,
             int32_t start,
             int32_t* limit,
             UErrorCode* status);

U_CAPI void
utrans_transIncremental(const UTransliterator* trans,
                        UReplaceable* rep,
                        UReplaceableCallbacks* repFunc,
                        UTransPosition* pos,
                        UErrorCode* status);

U_CAPI void
utrans_transUChars(const UTransliterator* trans,
                   UChar* text,
                   int32_t* textLength,
                   int32_t textCapacity,
                   int32_t start,
                   int32_t* limit,
                   UErrorCode* status);

U_CAPI void
utrans_transIncrementalUChars(const UTransliterator* trans,
                              UChar* text,
                              int32_t* textLength,
                              int32_t textCapacity,
                              UTransPosition* pos,
                              UErrorCode* status);

#endif

Generated at Wed Aug 16 16:05:56 2000 for ICU1.6 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999