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

CompoundTransliterator Class Reference

A transliterator that is composed of two or more other transliterator objects linked together. More...

#include <cpdtrans.h>

Inheritance diagram for CompoundTransliterator:

Transliterator

Public Member Functions

 CompoundTransliterator (Transliterator *const transliterators[], int32_t transliteratorCount, UnicodeFilter *adoptedFilter=0)
 Constructs a new compound transliterator given an array of transliterators.
 CompoundTransliterator (const UnicodeString &id, UTransDirection dir, UnicodeFilter *adoptedFilter, UParseError &parseError, UErrorCode &status)
 Constructs a new compound transliterator.
 CompoundTransliterator (const UnicodeString &id, UParseError &parseError, UErrorCode &status)
 Constructs a new compound transliterator in the FORWARD direction with a NULL filter.
virtual ~CompoundTransliterator ()
 Destructor.
 CompoundTransliterator (const CompoundTransliterator &)
 Copy constructor.
CompoundTransliteratoroperator= (const CompoundTransliterator &)
 Assignment operator.
Transliteratorclone (void) const
 Transliterator API.
virtual int32_t getCount (void) const
 Returns the number of transliterators in this chain.
virtual const TransliteratorgetTransliterator (int32_t index) const
 Returns the transliterator at the given index in this chain.
void setTransliterators (Transliterator *const transliterators[], int32_t count)
 Sets the transliterators.
void adoptTransliterators (Transliterator *adoptedTransliterators[], int32_t count)
 Adopts the transliterators.
virtual UnicodeStringtoRules (UnicodeString &result, UBool escapeUnprintable) const
 Override Transliterator: Create a rule string that can be passed to createFromRules() to recreate this transliterator.
virtual void handleTransliterate (Replaceable &text, UTransPosition &index, UBool incremental) const
 Implements Transliterator#handleTransliterate.

Friends

class Transliterator
class TransliteratorAlias

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.

Copyright © IBM Corporation 1999. All rights reserved.

Author:
Alan Liu
Deprecated:
To be removed after 2002-sep-30.


Constructor & Destructor Documentation

CompoundTransliterator::CompoundTransliterator Transliterator *const   transliterators[],
int32_t  transliteratorCount,
UnicodeFilter adoptedFilter = 0
 

Constructs a new compound transliterator given an array of transliterators.

The array of transliterators may be of any length, including zero or one, however, useful compound transliterators have at least two components.

Parameters:
transliterators array of Transliterator objects
transliteratorCount The number of Transliterator objects in transliterators.
filter the filter. Any character for which filter.contains() returns false will not be altered by this transliterator. If filter is null then no filtering is applied.
Deprecated:
To be removed after 2002-sep-30; use the Transliterator::createInstance factory method.

CompoundTransliterator::CompoundTransliterator const UnicodeString id,
UTransDirection  dir,
UnicodeFilter adoptedFilter,
UParseError parseError,
UErrorCode status
 

Constructs a new compound transliterator.

Parameters:
id compound ID
dir either UTRANS_FORWARD or UTRANS_REVERSE
adoptedFilter a global filter for this compound transliterator or NULL
Deprecated:
To be removed after 2002-sep-30; use the Transliterator::createInstance factory method.

CompoundTransliterator::CompoundTransliterator const UnicodeString id,
UParseError parseError,
UErrorCode status
 

Constructs a new compound transliterator in the FORWARD direction with a NULL filter.

Deprecated:
To be removed after 2002-sep-30; use the Transliterator::createInstance factory method.

virtual CompoundTransliterator::~CompoundTransliterator  )  [virtual]
 

Destructor.

Deprecated:
To be removed after 2002-sep-30.

CompoundTransliterator::CompoundTransliterator const CompoundTransliterator  ) 
 

Copy constructor.

Deprecated:
To be removed after 2002-sep-30; use the Transliterator::createInstance factory method.


Member Function Documentation

void CompoundTransliterator::adoptTransliterators Transliterator adoptedTransliterators[],
int32_t  count
 

Adopts the transliterators.

Deprecated:
To be removed after 2002-sep-30.

Transliterator* CompoundTransliterator::clone void   )  const [virtual]
 

Transliterator API.

Deprecated:
To be removed after 2002-sep-30.

Reimplemented from Transliterator.

virtual int32_t CompoundTransliterator::getCount void   )  const [virtual]
 

Returns the number of transliterators in this chain.

Returns:
number of transliterators in this chain.
Deprecated:
To be removed after 2002-sep-30.

virtual const Transliterator& CompoundTransliterator::getTransliterator int32_t  index  )  const [virtual]
 

Returns the transliterator at the given index in this chain.

Parameters:
index index into chain, from 0 to getCount() - 1
Returns:
transliterator at the given index
Deprecated:
To be removed after 2002-sep-30.

virtual void CompoundTransliterator::handleTransliterate Replaceable text,
UTransPosition index,
UBool  incremental
const [virtual]
 

Implements Transliterator#handleTransliterate.

Deprecated:
To be removed after 2002-sep-30.

Implements Transliterator.

CompoundTransliterator& CompoundTransliterator::operator= const CompoundTransliterator  ) 
 

Assignment operator.

Deprecated:
To be removed after 2002-sep-30.

void CompoundTransliterator::setTransliterators Transliterator *const   transliterators[],
int32_t  count
 

Sets the transliterators.

Deprecated:
To be removed after 2002-sep-30.

virtual UnicodeString& CompoundTransliterator::toRules UnicodeString result,
UBool  escapeUnprintable
const [virtual]
 

Override Transliterator: Create a rule string that can be passed to createFromRules() to recreate this transliterator.

Parameters:
result the string to receive the rules. Previous contents will be deleted.
escapeUnprintable if TRUE then convert unprintable character to their hex escape representations, or . Unprintable characters are those other than U+000A, U+0020..U+007E.
Deprecated:
To be removed after 2002-sep-30.

Reimplemented from Transliterator.


The documentation for this class was generated from the following file:
Generated on Wed Nov 17 21:02:07 2004 for ICU 2.1 by  doxygen 1.3.9.1