ContextualGlyphSubstProc.h revision c73f511526464f8e56c242df80552e9b0d94ae3d
1/*
2 *
3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
4 *
5 */
6
7#ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
8#define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
9
10/**
11 * \file
12 * \internal
13 */
14
15#include "LETypes.h"
16#include "MorphTables.h"
17#include "SubtableProcessor.h"
18#include "StateTableProcessor.h"
19#include "ContextualGlyphSubstitution.h"
20
21U_NAMESPACE_BEGIN
22
23class LEGlyphStorage;
24
25class ContextualGlyphSubstitutionProcessor : public StateTableProcessor
26{
27public:
28    virtual void beginStateTable();
29
30    virtual ByteOffset processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index);
31
32    virtual void endStateTable();
33
34    ContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
35    virtual ~ContextualGlyphSubstitutionProcessor();
36
37    /**
38     * ICU "poor man's RTTI", returns a UClassID for the actual class.
39     *
40     * @stable ICU 2.8
41     */
42    virtual UClassID getDynamicClassID() const;
43
44    /**
45     * ICU "poor man's RTTI", returns a UClassID for this class.
46     *
47     * @stable ICU 2.8
48     */
49    static UClassID getStaticClassID();
50
51private:
52    ContextualGlyphSubstitutionProcessor();
53
54protected:
55    ByteOffset substitutionTableOffset;
56    LEReferenceToArrayOf<ContextualGlyphSubstitutionStateEntry> entryTable;
57    LEReferenceToArrayOf<le_int16> int16Table;
58    le_int32 markGlyph;
59
60    LEReferenceTo<ContextualGlyphSubstitutionHeader> contextualGlyphSubstitutionHeader;
61
62};
63
64U_NAMESPACE_END
65#endif
66