]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
b75a7d8f | 2 | * |
57a6839d | 3 | * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved |
b75a7d8f A |
4 | * |
5 | */ | |
6 | ||
7 | #include "LETypes.h" | |
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" | |
17 | #include "LESwaps.h" | |
18 | ||
19 | U_NAMESPACE_BEGIN | |
20 | ||
21 | NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor() | |
22 | { | |
23 | } | |
24 | ||
57a6839d A |
25 | NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success) |
26 | : SubtableProcessor(morphSubtableHeader, success) | |
b75a7d8f A |
27 | { |
28 | } | |
29 | ||
30 | NonContextualGlyphSubstitutionProcessor::~NonContextualGlyphSubstitutionProcessor() | |
31 | { | |
32 | } | |
33 | ||
57a6839d | 34 | SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success) |
b75a7d8f | 35 | { |
57a6839d | 36 | LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success); |
b75a7d8f | 37 | |
57a6839d A |
38 | if(LE_FAILURE(success)) return NULL; |
39 | ||
40 | switch (SWAPW(header->table.format)) { | |
b75a7d8f | 41 | case ltfSimpleArray: |
57a6839d | 42 | return new SimpleArrayProcessor(morphSubtableHeader, success); |
b75a7d8f A |
43 | |
44 | case ltfSegmentSingle: | |
57a6839d | 45 | return new SegmentSingleProcessor(morphSubtableHeader, success); |
b75a7d8f A |
46 | |
47 | case ltfSegmentArray: | |
57a6839d | 48 | return new SegmentArrayProcessor(morphSubtableHeader, success); |
b75a7d8f A |
49 | |
50 | case ltfSingleTable: | |
57a6839d | 51 | return new SingleTableProcessor(morphSubtableHeader, success); |
b75a7d8f A |
52 | |
53 | case ltfTrimmedArray: | |
57a6839d | 54 | return new TrimmedArrayProcessor(morphSubtableHeader, success); |
b75a7d8f A |
55 | |
56 | default: | |
57 | return NULL; | |
58 | } | |
59 | } | |
60 | ||
61 | U_NAMESPACE_END |