2000-11-28 20:56:52 +00:00
|
|
|
/*
|
2000-12-21 21:55:31 +00:00
|
|
|
* @(#)LigatureSubstProc.h 1.6 00/03/15
|
2000-11-28 20:56:52 +00:00
|
|
|
*
|
2003-06-03 20:58:22 +00:00
|
|
|
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
|
2000-11-28 20:56:52 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LIGATURESUBSTITUTIONPROCESSOR_H
|
|
|
|
#define __LIGATURESUBSTITUTIONPROCESSOR_H
|
|
|
|
|
2003-01-13 23:15:11 +00:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* \internal
|
|
|
|
*/
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
#include "LETypes.h"
|
|
|
|
#include "MorphTables.h"
|
|
|
|
#include "SubtableProcessor.h"
|
|
|
|
#include "StateTableProcessor.h"
|
|
|
|
#include "LigatureSubstitution.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
#define nComponents 16
|
|
|
|
|
|
|
|
class LigatureSubstitutionProcessor : public StateTableProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void beginStateTable();
|
|
|
|
|
|
|
|
virtual ByteOffset processStateEntry(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 &currGlyph,
|
|
|
|
le_int32 glyphCount, EntryTableIndex index);
|
|
|
|
|
|
|
|
virtual void endStateTable();
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
|
2000-11-28 20:56:52 +00:00
|
|
|
virtual ~LigatureSubstitutionProcessor();
|
|
|
|
|
2002-06-29 00:04:16 +00:00
|
|
|
/**
|
|
|
|
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
|
|
|
*
|
2003-11-26 00:19:39 +00:00
|
|
|
* @stable ICU 2.8
|
2002-06-29 00:04:16 +00:00
|
|
|
*/
|
|
|
|
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ICU "poor man's RTTI", returns a UClassID for this class.
|
|
|
|
*
|
2003-11-26 00:19:39 +00:00
|
|
|
* @stable ICU 2.8
|
2002-06-29 00:04:16 +00:00
|
|
|
*/
|
|
|
|
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
private:
|
|
|
|
LigatureSubstitutionProcessor();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ByteOffset ligatureActionTableOffset;
|
|
|
|
ByteOffset componentTableOffset;
|
|
|
|
ByteOffset ligatureTableOffset;
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
const LigatureSubstitutionStateEntry *entryTable;
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
le_int32 componentStack[nComponents];
|
|
|
|
le_int16 m;
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
const LigatureSubstitutionHeader *ligatureSubstitutionHeader;
|
2002-06-29 00:04:16 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The address of this static class variable serves as this class's ID
|
|
|
|
* for ICU "poor man's RTTI".
|
|
|
|
*/
|
|
|
|
static const char fgClassID;
|
2000-11-28 20:56:52 +00:00
|
|
|
};
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_END
|
2000-11-28 20:56:52 +00:00
|
|
|
#endif
|