]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/cpdtrans.h
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / i18n / cpdtrans.h
index cd2efc9e6821e113a769269f24cf18b7d8e7849c..e964d4cc3afbae090b9dd9a2f0f745cea57ec55d 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 1999-2003, International Business Machines
+*   Copyright (C) 1999-2009, 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;
 
 /**
@@ -42,13 +42,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:
 
@@ -105,17 +99,11 @@ public:
      */
     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.
@@ -126,11 +114,11 @@ public:
 
     /**
      * Returns the transliterator at the given index in this chain.
-     * @param index index into chain, from 0 to <code>getCount() - 1</code>
+     * @param idx index into chain, from 0 to <code>getCount() - 1</code>
      * @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.
@@ -178,7 +166,7 @@ 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:
@@ -188,14 +176,17 @@ public:
      *
      * @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 +194,32 @@ 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.
+     * @internal Use transliterator factory methods instead since this class will be removed in that release.
      */
-    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 +239,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 */