]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/LookupProcessor.h
ICU-6.2.21.tar.gz
[apple/icu.git] / icuSources / layout / LookupProcessor.h
CommitLineData
b75a7d8f
A
1/*
2 * %W% %E%
3 *
374ca955 4 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
b75a7d8f
A
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 "Lookups.h"
20#include "Features.h"
21#include "GlyphDefinitionTables.h"
22#include "GlyphPositionAdjustments.h"
23#include "GlyphIterator.h"
24
25U_NAMESPACE_BEGIN
26
374ca955
A
27class LEGlyphStorage;
28
b75a7d8f
A
29class LookupProcessor : public UMemory {
30public:
31 static const LETag notSelected;
32 static const LETag defaultFeature;
33
374ca955 34 le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustment *glyphPositionAdjustments,
b75a7d8f
A
35 le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
36
37 le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
38
39 le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
40
41 virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
42 GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const = 0;
43
44 virtual ~LookupProcessor();
45
46protected:
47 LookupProcessor(const char *baseAddress,
48 Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
49 LETag scriptTag, LETag languageTag, const LETag *featureOrder);
50
51 LookupProcessor();
52
53 le_int32 selectLookups(const FeatureTable *featureTable, LETag featureTag, le_int32 order);
54
55 const LookupListTable *lookupListTable;
56 const FeatureListTable *featureListTable;
57
58 LETag *lookupSelectArray;
59 LETag requiredFeatureTag;
60
61 le_uint16 *lookupOrderArray;
62 le_uint32 lookupOrderCount;
63
64private:
65
66 LookupProcessor(const LookupProcessor &other); // forbid copying of this class
67 LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
68};
69
70U_NAMESPACE_END
71#endif