X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..4388f060552cc537e71e957d32f35e9d75a61233:/icuSources/i18n/transreg.h diff --git a/icuSources/i18n/transreg.h b/icuSources/i18n/transreg.h index 866ce8f4..483e74f4 100644 --- a/icuSources/i18n/transreg.h +++ b/icuSources/i18n/transreg.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2001-2004, International Business Machines +* Copyright (c) 2001-2008, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -21,8 +21,8 @@ U_NAMESPACE_BEGIN -class Entry; -class Spec; +class TransliteratorEntry; +class TransliteratorSpec; class UnicodeString; //------------------------------------------------------------------ @@ -44,13 +44,13 @@ class TransliteratorAlias : public UMemory { * 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); /** @@ -108,10 +108,10 @@ class TransliteratorAlias : public UMemory { // 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 @@ -202,7 +202,8 @@ class TransliteratorRegistry : public UMemory { * 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 @@ -212,7 +213,8 @@ class TransliteratorRegistry : public UMemory { 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 @@ -222,7 +224,9 @@ class TransliteratorRegistry : public UMemory { 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 @@ -231,7 +235,9 @@ class TransliteratorRegistry : public UMemory { */ 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 @@ -353,40 +359,40 @@ class TransliteratorRegistry : public UMemory { // 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, @@ -398,7 +404,7 @@ class TransliteratorRegistry : public UMemory { const UnicodeString& variant); Transliterator* instantiateEntry(const UnicodeString& ID, - Entry *entry, + TransliteratorEntry *entry, TransliteratorAlias*& aliasReturn, UErrorCode& status);