2000-11-28 20:56:52 +00:00
|
|
|
/*
|
|
|
|
*
|
2004-04-12 18:51:31 +00:00
|
|
|
* (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
|
2000-11-28 20:56:52 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
|
|
|
|
#define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_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 "ContextualGlyphSubstitution.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2004-04-12 18:51:31 +00:00
|
|
|
class LEGlyphStorage;
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
class ContextualGlyphSubstitutionProcessor : public StateTableProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void beginStateTable();
|
|
|
|
|
2004-04-12 18:51:31 +00:00
|
|
|
virtual ByteOffset processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index);
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
virtual void endStateTable();
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
|
2000-11-28 20:56:52 +00:00
|
|
|
virtual ~ContextualGlyphSubstitutionProcessor();
|
|
|
|
|
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:
|
|
|
|
ContextualGlyphSubstitutionProcessor();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ByteOffset substitutionTableOffset;
|
2001-01-19 00:30:17 +00:00
|
|
|
const ContextualGlyphSubstitutionStateEntry *entryTable;
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
le_int32 markGlyph;
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader;
|
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
|