/*
**********************************************************************
-* Copyright (c) 2001-2004, International Business Machines
+* Copyright (c) 2001-2008, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
U_NAMESPACE_BEGIN
-class Entry;
-class Spec;
+class TransliteratorEntry;
+class TransliteratorSpec;
class UnicodeString;
//------------------------------------------------------------------
* Construct a simple alias (type == SIMPLE)
* @param aliasID the given id.
*/
- TransliteratorAlias(const UnicodeString& aliasID);
+ TransliteratorAlias(const UnicodeString& aliasID, const UnicodeSet* compoundFilter);
/**
* Construct a compound RBT alias (type == COMPOUND)
*/
- TransliteratorAlias(const UnicodeString& ID, const UnicodeString& idBlock,
- Transliterator* adopted, int32_t idSplitPoint,
+ TransliteratorAlias(const UnicodeString& ID, const UnicodeString& idBlocks,
+ UVector* adoptedTransliterators,
const UnicodeSet* compoundFilter);
/**
// Here ID is the ID, aliasID is the rules string.
// idSplitPoint is the UTransDirection.
UnicodeString ID;
- UnicodeString aliasID; // rename! holds rules for RULES type
- Transliterator* trans; // owned
+ UnicodeString aliasesOrRules;
+ UVector* transes; // owned
const UnicodeSet* compoundFilter; // alias
- int32_t idSplitPoint; // rename! holds UTransDirection for RULES type
+ UTransDirection direction;
enum { SIMPLE, COMPOUND, RULES } type;
TransliteratorAlias(const TransliteratorAlias &other); // forbid copying of this class
* underlying static locale resource store is masked.
*/
void put(Transliterator* adoptedProto,
- UBool visible);
+ UBool visible,
+ UErrorCode& ec);
/**
* Register an ID and a factory function pointer. This adds an
void put(const UnicodeString& ID,
Transliterator::Factory factory,
Transliterator::Token context,
- UBool visible);
+ UBool visible,
+ UErrorCode& ec);
/**
* Register an ID and a resource name. This adds an entry to the
void put(const UnicodeString& ID,
const UnicodeString& resourceName,
UTransDirection dir,
- UBool visible);
+ UBool readonlyResourceAlias,
+ UBool visible,
+ UErrorCode& ec);
/**
* Register an ID and an alias ID. This adds an entry to the
*/
void put(const UnicodeString& ID,
const UnicodeString& alias,
- UBool visible);
+ UBool readonlyAliasAlias,
+ UBool visible,
+ UErrorCode& ec);
/**
* Unregister an ID. This removes an entry from the dynamic store
// Private implementation
//----------------------------------------------------------------
- Entry* find(const UnicodeString& ID);
+ TransliteratorEntry* find(const UnicodeString& ID);
- Entry* find(UnicodeString& source,
+ TransliteratorEntry* find(UnicodeString& source,
UnicodeString& target,
UnicodeString& variant);
- Entry* findInDynamicStore(const Spec& src,
- const Spec& trg,
+ TransliteratorEntry* findInDynamicStore(const TransliteratorSpec& src,
+ const TransliteratorSpec& trg,
const UnicodeString& variant) const;
- Entry* findInStaticStore(const Spec& src,
- const Spec& trg,
+ TransliteratorEntry* findInStaticStore(const TransliteratorSpec& src,
+ const TransliteratorSpec& trg,
const UnicodeString& variant);
- static Entry* findInBundle(const Spec& specToOpen,
- const Spec& specToFind,
+ static TransliteratorEntry* findInBundle(const TransliteratorSpec& specToOpen,
+ const TransliteratorSpec& specToFind,
const UnicodeString& variant,
UTransDirection direction);
void registerEntry(const UnicodeString& source,
const UnicodeString& target,
const UnicodeString& variant,
- Entry* adopted,
+ TransliteratorEntry* adopted,
UBool visible);
void registerEntry(const UnicodeString& ID,
- Entry* adopted,
+ TransliteratorEntry* adopted,
UBool visible);
void registerEntry(const UnicodeString& ID,
const UnicodeString& source,
const UnicodeString& target,
const UnicodeString& variant,
- Entry* adopted,
+ TransliteratorEntry* adopted,
UBool visible);
void registerSTV(const UnicodeString& source,
const UnicodeString& variant);
Transliterator* instantiateEntry(const UnicodeString& ID,
- Entry *entry,
+ TransliteratorEntry *entry,
TransliteratorAlias*& aliasReturn,
UErrorCode& status);