2 * @(#)SingleTableProcessor.cpp 1.6 00/03/15
4 * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
9 #include "MorphTables.h"
10 #include "SubtableProcessor.h"
11 #include "NonContextualGlyphSubst.h"
12 #include "NonContextualGlyphSubstProc.h"
13 #include "SingleTableProcessor.h"
18 const char SingleTableProcessor::fgClassID
=0;
20 SingleTableProcessor::SingleTableProcessor()
24 SingleTableProcessor::SingleTableProcessor(const MorphSubtableHeader
*moprhSubtableHeader
)
25 : NonContextualGlyphSubstitutionProcessor(moprhSubtableHeader
)
27 const NonContextualGlyphSubstitutionHeader
*header
= (const NonContextualGlyphSubstitutionHeader
*) moprhSubtableHeader
;
29 singleTableLookupTable
= (const SingleTableLookupTable
*) &header
->table
;
32 SingleTableProcessor::~SingleTableProcessor()
36 void SingleTableProcessor::process(LEGlyphID
*glyphs
, le_int32
* /*charIndices*/, le_int32 glyphCount
)
38 const LookupSingle
*entries
= singleTableLookupTable
->entries
;
41 for (glyph
= 0; glyph
< glyphCount
; glyph
+= 1) {
42 const LookupSingle
*lookupSingle
= singleTableLookupTable
->lookupSingle(entries
, glyphs
[glyph
]);
44 if (lookupSingle
!= NULL
) {
45 glyphs
[glyph
] = SWAPW(lookupSingle
->value
);