Remove packaging direcotry
[platform/upstream/icu.git] / source / layout / LookupProcessor.h
1 /*
2  * %W% %E%
3  *
4  * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved
5  *
6  */
7
8 #ifndef __LOOKUPPROCESSOR_H
9 #define __LOOKUPPROCESSOR_H
10
11 /**
12  * \file
13  * \internal
14  */
15
16 #include "LETypes.h"
17 #include "LEFontInstance.h"
18 #include "OpenTypeTables.h"
19 #include "LETableReference.h"
20 #include "Lookups.h"
21
22 U_NAMESPACE_BEGIN
23
24 class  LEFontInstance;
25 class  LEGlyphStorage;
26 class  GlyphIterator;
27 class  GlyphPositionAdjustments;
28 struct FeatureTable;
29 struct FeatureListTable;
30 struct GlyphDefinitionTableHeader;
31 struct LookupSubtable;
32
33 class LookupProcessor : public UMemory {
34 public:
35     le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
36                  le_bool rightToLeft, const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const;
37
38     le_uint32 applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
39
40     le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
41
42     virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 subtableType,
43         GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const = 0;
44
45     virtual ~LookupProcessor();
46
47     const LETableReference &getReference() const { return fReference; }
48
49 protected:
50     LookupProcessor(const LETableReference &baseAddress,
51         Offset scriptListOffset, 
52         Offset featureListOffset, 
53         Offset lookupListOffset,
54         LETag scriptTag, 
55         LETag languageTag, 
56         const FeatureMap *featureMap, 
57         le_int32 featureMapCount, 
58         le_bool orderFeatures, 
59         LEErrorCode& success);
60
61     LookupProcessor();
62
63     le_int32 selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success);
64
65     LEReferenceTo<LookupListTable>   lookupListTable;
66     LEReferenceTo<FeatureListTable>  featureListTable;
67
68     FeatureMask            *lookupSelectArray;
69     le_uint32              lookupSelectCount;
70
71     le_uint16               *lookupOrderArray;
72     le_uint32               lookupOrderCount;
73
74     LETableReference        fReference;
75
76 private:
77
78     LookupProcessor(const LookupProcessor &other); // forbid copying of this class
79     LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
80 };
81
82 U_NAMESPACE_END
83 #endif