Logo Search packages:      
Sourcecode: icu version File versions  Download package

CompoundTransliterator Class Reference

#include <cpdtrans.h>

Inheritance diagram for CompoundTransliterator:

Transliterator UObject UMemory

List of all members.

Detailed Description

A transliterator that is composed of two or more other transliterator objects linked together. For example, if one transliterator transliterates from script A to script B, and another transliterates from script B to script C, the two may be combined to form a new transliterator from A to C.

Composed transliterators may not behave as expected. For example, inverses may not combine to form the identity transliterator. See the class documentation for Transliterator for details.

Alan Liu

For internal use only.

Use transliterator factory methods instead since this class will be removed in that release.

Definition at line 39 of file cpdtrans.h.

Public Types

typedef Transliterator
*(U_EXPORT2 * 
Factory )(const UnicodeString &ID, Token context)

Public Member Functions

void adoptFilter (UnicodeFilter *adoptedFilter)
void adoptTransliterators (Transliterator *adoptedTransliterators[], int32_t count)
virtual Transliteratorclone (void) const
 CompoundTransliterator (const CompoundTransliterator &)
 CompoundTransliterator (const UnicodeString &id, UParseError &parseError, UErrorCode &status)
 CompoundTransliterator (const UnicodeString &id, UTransDirection dir, UnicodeFilter *adoptedFilter, UParseError &parseError, UErrorCode &status)
 CompoundTransliterator (Transliterator *const transliterators[], int32_t transliteratorCount, UnicodeFilter *adoptedFilter=0)
int32_t countElements () const
TransliteratorcreateInverse (UErrorCode &status) const
virtual void filteredTransliterate (Replaceable &text, UTransPosition &index, UBool incremental) const
virtual void finishTransliteration (Replaceable &text, UTransPosition &index) const
virtual int32_t getCount (void) const
virtual UClassID getDynamicClassID () const
const TransliteratorgetElement (int32_t index, UErrorCode &ec) const
const UnicodeFiltergetFilter (void) const
virtual const UnicodeStringgetID (void) const
int32_t getMaximumContextLength (void) const
UnicodeSetgetSourceSet (UnicodeSet &result) const
virtual UnicodeSetgetTargetSet (UnicodeSet &result) const
virtual const TransliteratorgetTransliterator (int32_t idx) const
UnicodeFilterorphanFilter (void)
void setTransliterators (Transliterator *const transliterators[], int32_t count)
virtual UnicodeStringtoRules (UnicodeString &result, UBool escapeUnprintable) const
virtual void transliterate (Replaceable &text, UTransPosition &index, UErrorCode &status) const
virtual void transliterate (Replaceable &text, UTransPosition &index, UChar32 insertion, UErrorCode &status) const
virtual void transliterate (Replaceable &text, UTransPosition &index, const UnicodeString &insertion, UErrorCode &status) const
virtual void transliterate (Replaceable &text) const
virtual int32_t transliterate (Replaceable &text, int32_t start, int32_t limit) const
virtual ~CompoundTransliterator ()

Static Public Member Functions

static int32_t U_EXPORT2 countAvailableIDs (void)
static int32_t U_EXPORT2 countAvailableSources (void)
static int32_t U_EXPORT2 countAvailableTargets (const UnicodeString &source)
static int32_t U_EXPORT2 countAvailableVariants (const UnicodeString &source, const UnicodeString &target)
static Transliterator *U_EXPORT2 createFromRules (const UnicodeString &ID, const UnicodeString &rules, UTransDirection dir, UParseError &parseError, UErrorCode &status)
static Transliterator *U_EXPORT2 createInstance (const UnicodeString &ID, UTransDirection dir, UErrorCode &status)
static Transliterator *U_EXPORT2 createInstance (const UnicodeString &ID, UTransDirection dir, UParseError &parseError, UErrorCode &status)
static const UnicodeString
getAvailableID (int32_t index)
static StringEnumeration *U_EXPORT2 getAvailableIDs (UErrorCode &ec)
static UnicodeString &U_EXPORT2 getAvailableSource (int32_t index, UnicodeString &result)
static UnicodeString &U_EXPORT2 getAvailableTarget (int32_t index, const UnicodeString &source, UnicodeString &result)
static UnicodeString &U_EXPORT2 getAvailableVariant (int32_t index, const UnicodeString &source, const UnicodeString &target, UnicodeString &result)
static UnicodeString &U_EXPORT2 getDisplayName (const UnicodeString &ID, const Locale &inLocale, UnicodeString &result)
static UnicodeString &U_EXPORT2 getDisplayName (const UnicodeString &ID, UnicodeString &result)
static UClassID U_EXPORT2 getStaticClassID ()
static Token integerToken (int32_t)
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW
static Token pointerToken (void *)
static void U_EXPORT2 registerAlias (const UnicodeString &aliasID, const UnicodeString &realID)
static void U_EXPORT2 registerFactory (const UnicodeString &id, Factory factory, Token context)
static void U_EXPORT2 registerInstance (Transliterator *adoptedObj)
static void U_EXPORT2 unregister (const UnicodeString &ID)

Static Public Attributes

static const UChar PASS_STRING [] = { 0x0025, 0x0050, 0x0061, 0x0073, 0x0073, 0 }

Protected Member Functions

virtual void handleGetSourceSet (UnicodeSet &result) const
virtual void handleTransliterate (Replaceable &text, UTransPosition &idx, UBool incremental) const
void setID (const UnicodeString &id)
void setMaximumContextLength (int32_t maxContextLength)

Static Protected Member Functions

static int32_t _countAvailableSources (void)
static int32_t _countAvailableTargets (const UnicodeString &source)
static int32_t _countAvailableVariants (const UnicodeString &source, const UnicodeString &target)
static UnicodeString_getAvailableSource (int32_t index, UnicodeString &result)
static UnicodeString_getAvailableTarget (int32_t index, const UnicodeString &source, UnicodeString &result)
static UnicodeString_getAvailableVariant (int32_t index, const UnicodeString &source, const UnicodeString &target, UnicodeString &result)
static void _registerAlias (const UnicodeString &aliasID, const UnicodeString &realID)
static void _registerFactory (const UnicodeString &id, Factory factory, Token context)
static void _registerInstance (Transliterator *adoptedObj)
static void _registerSpecialInverse (const UnicodeString &target, const UnicodeString &inverseTarget, UBool bidirectional)
static TransliteratorcreateBasicInstance (const UnicodeString &id, const UnicodeString *canon)

Private Member Functions

 CompoundTransliterator (UVector &list, int32_t anonymousRBTs, UParseError &parseError, UErrorCode &status)
 CompoundTransliterator (UVector &list, UParseError &parseError, UErrorCode &status)
 CompoundTransliterator (const UnicodeString &ID, UVector &list, UnicodeFilter *adoptedFilter, int32_t numAnonymousRBTs, UParseError &parseError, UErrorCode &status)
void computeMaximumContextLength (void)
void freeTransliterators (void)
void init (UVector &list, UTransDirection direction, UBool fixReverseID, UErrorCode &status)
void init (const UnicodeString &id, UTransDirection direction, UBool fixReverseID, UErrorCode &status)
UnicodeString joinIDs (Transliterator *const transliterators[], int32_t transCount)
CompoundTransliteratoroperator= (const CompoundTransliterator &)

Private Attributes

int32_t count
int32_t numAnonymousRBTs
Transliterator ** trans


class Transliterator
class TransliteratorAlias
class TransliteratorIDParser
class TransliteratorParser

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index