3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
8 #include "MorphTables.h"
9 #include "SubtableProcessor.h"
10 #include "NonContextualGlyphSubst.h"
11 #include "NonContextualGlyphSubstProc.h"
12 #include "SimpleArrayProcessor.h"
13 #include "SegmentSingleProcessor.h"
14 #include "SegmentArrayProcessor.h"
15 #include "SingleTableProcessor.h"
16 #include "TrimmedArrayProcessor.h"
21 NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor()
25 NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const LEReferenceTo
<MorphSubtableHeader
> &morphSubtableHeader
, LEErrorCode
&success
)
26 : SubtableProcessor(morphSubtableHeader
, success
)
30 NonContextualGlyphSubstitutionProcessor::~NonContextualGlyphSubstitutionProcessor()
34 SubtableProcessor
*NonContextualGlyphSubstitutionProcessor::createInstance(const LEReferenceTo
<MorphSubtableHeader
> &morphSubtableHeader
, LEErrorCode
&success
)
36 LEReferenceTo
<NonContextualGlyphSubstitutionHeader
> header(morphSubtableHeader
, success
);
38 if(LE_FAILURE(success
)) return NULL
;
40 switch (SWAPW(header
->table
.format
)) {
42 return new SimpleArrayProcessor(morphSubtableHeader
, success
);
44 case ltfSegmentSingle
:
45 return new SegmentSingleProcessor(morphSubtableHeader
, success
);
48 return new SegmentArrayProcessor(morphSubtableHeader
, success
);
51 return new SingleTableProcessor(morphSubtableHeader
, success
);
54 return new TrimmedArrayProcessor(morphSubtableHeader
, success
);