]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/IndicLayoutEngine.h
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / layout / IndicLayoutEngine.h
index f72133438592f877abd3f42f4a5c1f4aa01eef8b..ff0b83cf0010562f6ccc1ed2bab284e36747e3cb 100644 (file)
@@ -1,8 +1,7 @@
 
 /*
 
 /*
- * @(#)IndicLayoutEngine.h     1.4 00/03/15
  *
  *
- * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
  *
  */
 
  *
  */
 
 #include "GlyphDefinitionTables.h"
 #include "GlyphPositioningTables.h"
 
 #include "GlyphDefinitionTables.h"
 #include "GlyphPositioningTables.h"
 
-#include <string.h>
-
 U_NAMESPACE_BEGIN
 
 class MPreFixups;
 U_NAMESPACE_BEGIN
 
 class MPreFixups;
+class LEGlyphStorage;
 
 /**
  * This class implements OpenType layout for Indic OpenType fonts, as
 
 /**
  * This class implements OpenType layout for Indic OpenType fonts, as
@@ -49,6 +47,7 @@ public:
      * @param scriptCode - the script
      * @param langaugeCode - the language
      * @param gsubTable - the GSUB table
      * @param scriptCode - the script
      * @param langaugeCode - the language
      * @param gsubTable - the GSUB table
+     * @param success - set to an error code if the operation fails
      *
      * @see LayoutEngine::layoutEngineFactory
      * @see OpenTypeLayoutEngine
      *
      * @see LayoutEngine::layoutEngineFactory
      * @see OpenTypeLayoutEngine
@@ -57,7 +56,7 @@ public:
      * @internal
      */
     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
      * @internal
      */
     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            const GlyphSubstitutionTableHeader *gsubTable);
+                            le_int32 typoFlags, le_bool version2, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -66,13 +65,15 @@ public:
      * @param fontInstance - the font
      * @param scriptCode - the script
      * @param langaugeCode - the language
      * @param fontInstance - the font
      * @param scriptCode - the script
      * @param langaugeCode - the language
+     * @param success - set to an error code if the operation fails
      *
      * @see OpenTypeLayoutEngine
      * @see ScriptAndLangaugeTags.h for script and language codes
      *
      * @internal
      */
      *
      * @see OpenTypeLayoutEngine
      * @see ScriptAndLangaugeTags.h for script and language codes
      *
      * @internal
      */
-    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode);
+    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                             le_int32 typoFlags, LEErrorCode &success);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -84,16 +85,16 @@ public:
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
      */
-    virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+    virtual UClassID getDynamicClassID() const;
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
      */
-    static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+    static UClassID getStaticClassID();
 
 protected:
 
 
 protected:
 
@@ -108,12 +109,11 @@ protected:
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
+     *                       the auxillary data array will be set to the feature tags.
      *
      * Output parameters:
      *
      * Output parameters:
-     * @param outChars - the output character arrayt
-     * @param charIndices - the output character index array
-     * @param featureTags - the output feature tag array
      * @param success - set to an error code if the operation fails
      *
      * @return the output character count
      * @param success - set to an error code if the operation fails
      *
      * @return the output character count
@@ -121,7 +121,7 @@ protected:
      * @internal
      */
     virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
      * @internal
      */
     virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-            LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success);
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method does character to glyph mapping, applies the GSUB table and applies
 
     /**
      * This method does character to glyph mapping, applies the GSUB table and applies
@@ -137,12 +137,11 @@ protected:
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
      * @param featureTags - the feature tag array
      * @param featureTags - the feature tag array
+     * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
      *
      * Output parameters:
      *
      * Output parameters:
-     * @param glyphs - the output glyph index array
-     * @param charIndices - the output character index array
      * @param success - set to an error code if the operation fails
      *
      * @return the number of glyphs in the output glyph index array
      * @param success - set to an error code if the operation fails
      *
      * @return the number of glyphs in the output glyph index array
@@ -153,17 +152,14 @@ protected:
      * @internal
      */
     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
      * @internal
      */
     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-            const LETag **featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
+            LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
 
-private:
+    le_bool fVersion2;
 
 
-    /**
-     * The address of this static class variable serves as this class's ID
-     * for ICU "poor man's RTTI".
-     */
-    static const char fgClassID;
+private:
 
     MPreFixups *fMPreFixups;
 
     MPreFixups *fMPreFixups;
+
 };
 
 U_NAMESPACE_END
 };
 
 U_NAMESPACE_END