1/* 2 * 3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved 4 * 5 */ 6 7#ifndef __STATETABLEPROCESSOR_H 8#define __STATETABLEPROCESSOR_H 9 10/** 11 * \file 12 * \internal 13 */ 14 15#include "LETypes.h" 16#include "MorphTables.h" 17#include "MorphStateTables.h" 18#include "SubtableProcessor.h" 19 20U_NAMESPACE_BEGIN 21 22class LEGlyphStorage; 23 24class StateTableProcessor : public SubtableProcessor 25{ 26public: 27 void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); 28 29 virtual void beginStateTable() = 0; 30 31 virtual ByteOffset processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index) = 0; 32 33 virtual void endStateTable() = 0; 34 35protected: 36 StateTableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success); 37 virtual ~StateTableProcessor(); 38 39 StateTableProcessor(); 40 41 le_int16 stateSize; 42 ByteOffset classTableOffset; 43 ByteOffset stateArrayOffset; 44 ByteOffset entryTableOffset; 45 46 LEReferenceTo<ClassTable> classTable; 47 TTGlyphID firstGlyph; 48 TTGlyphID lastGlyph; 49 50 LEReferenceTo<MorphStateTableHeader> stateTableHeader; 51 LEReferenceTo<StateTableHeader> stHeader; // for convenience 52 53private: 54 StateTableProcessor(const StateTableProcessor &other); // forbid copying of this class 55 StateTableProcessor &operator=(const StateTableProcessor &other); // forbid copying of this class 56}; 57 58U_NAMESPACE_END 59#endif 60