X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..151279e3792e85d0417b499c229886b3af724f55:/icuSources/i18n/cpdtrans.h?ds=inline diff --git a/icuSources/i18n/cpdtrans.h b/icuSources/i18n/cpdtrans.h index cd2efc9e..e3464ed0 100644 --- a/icuSources/i18n/cpdtrans.h +++ b/icuSources/i18n/cpdtrans.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2003, International Business Machines +* Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -18,7 +18,7 @@ U_NAMESPACE_BEGIN -class U_I18N_API UVector; +class U_COMMON_API UVector; class TransliteratorRegistry; /** @@ -34,7 +34,6 @@ class TransliteratorRegistry; * Transliterator} for details. * * @author Alan Liu - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ class U_I18N_API CompoundTransliterator : public Transliterator { @@ -42,13 +41,7 @@ class U_I18N_API CompoundTransliterator : public Transliterator { int32_t count; - /** - * For compound RBTs (those with an ::id block before and/or after - * the main rule block) we record the index of the RBT here. - * Otherwise, this should have a value of -1. We need this - * information to implement toRules(). - */ - int32_t compoundRBTIndex; + int32_t numAnonymousRBTs; public: @@ -65,7 +58,6 @@ public: * filter.contains() returns false will not be * altered by this transliterator. If filter is * null then no filtering is applied. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ CompoundTransliterator(Transliterator* const transliterators[], int32_t transliteratorCount, @@ -77,7 +69,6 @@ public: * @param dir either UTRANS_FORWARD or UTRANS_REVERSE * @param adoptedFilter a global filter for this compound transliterator * or NULL - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ CompoundTransliterator(const UnicodeString& id, UTransDirection dir, @@ -88,60 +79,46 @@ public: /** * Constructs a new compound transliterator in the FORWARD * direction with a NULL filter. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ CompoundTransliterator(const UnicodeString& id, UParseError& parseError, UErrorCode& status); /** * Destructor. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ virtual ~CompoundTransliterator(); /** * Copy constructor. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ CompoundTransliterator(const CompoundTransliterator&); - /** - * Assignment operator. - * @internal Use transliterator factory methods instead since this class will be removed in that release. - */ - CompoundTransliterator& operator=(const CompoundTransliterator&); - /** * Transliterator API. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ - Transliterator* clone(void) const; + virtual Transliterator* clone(void) const; /** * Returns the number of transliterators in this chain. * @return number of transliterators in this chain. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ virtual int32_t getCount(void) const; /** * Returns the transliterator at the given index in this chain. - * @param index index into chain, from 0 to getCount() - 1 + * @param idx index into chain, from 0 to getCount() - 1 * @return transliterator at the given index - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ - virtual const Transliterator& getTransliterator(int32_t index) const; + virtual const Transliterator& getTransliterator(int32_t idx) const; /** * Sets the transliterators. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ void setTransliterators(Transliterator* const transliterators[], int32_t count); /** * Adopts the transliterators. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ void adoptTransliterators(Transliterator* adoptedTransliterators[], int32_t count); @@ -156,7 +133,6 @@ public: * character to their hex escape representations, \uxxxx or * \Uxxxxxxxx. Unprintable characters are those other than * U+000A, U+0020..U+007E. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ virtual UnicodeString& toRules(UnicodeString& result, UBool escapeUnprintable) const; @@ -176,26 +152,24 @@ public: protected: /** * Implements {@link Transliterator#handleTransliterate}. - * @internal Use transliterator factory methods instead since this class will be removed in that release. */ - virtual void handleTransliterate(Replaceable& text, UTransPosition& index, + virtual void handleTransliterate(Replaceable& text, UTransPosition& idx, UBool incremental) const; public: /** * ICU "poor man's RTTI", returns a UClassID for the actual class. - * - * @draft ICU 2.2 */ - virtual inline UClassID getDynamicClassID() const; + virtual UClassID getDynamicClassID() const; /** * ICU "poor man's RTTI", returns a UClassID for this class. - * - * @draft ICU 2.2 */ - static inline UClassID getStaticClassID(); + static UClassID U_EXPORT2 getStaticClassID(); + + /* @internal */ + static const UChar PASS_STRING[]; private: @@ -203,27 +177,31 @@ private: friend class TransliteratorAlias; // to access private ct /** - * Private constructor for compound RBTs. Construct a compound - * transliterator using the given idBlock, with the adoptedTrans - * inserted at the idSplitPoint. + * Assignment operator. */ - CompoundTransliterator(const UnicodeString& ID, - const UnicodeString& idBlock, - int32_t idSplitPoint, - Transliterator *adoptedTrans, - UErrorCode& status); - + CompoundTransliterator& operator=(const CompoundTransliterator&); + /** * Private constructor for Transliterator. */ + CompoundTransliterator(const UnicodeString& ID, + UVector& list, + UnicodeFilter* adoptedFilter, + int32_t numAnonymousRBTs, + UParseError& parseError, + UErrorCode& status); + CompoundTransliterator(UVector& list, UParseError& parseError, UErrorCode& status); + CompoundTransliterator(UVector& list, + int32_t anonymousRBTs, + UParseError& parseError, + UErrorCode& status); + void init(const UnicodeString& id, UTransDirection direction, - int32_t idSplitPoint, - Transliterator *adoptedRbt, UBool fixReverseID, UErrorCode& status); @@ -243,22 +221,8 @@ private: void freeTransliterators(void); void computeMaximumContextLength(void); - - /** - * The address of this static class variable serves as this class's ID - * for ICU "poor man's RTTI". - */ - static const char fgClassID; }; -inline UClassID -CompoundTransliterator::getStaticClassID() -{ return (UClassID)&fgClassID; } - -inline UClassID -CompoundTransliterator::getDynamicClassID() const -{ return CompoundTransliterator::getStaticClassID(); } - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_TRANSLITERATION */