]>
Commit | Line | Data |
---|---|---|
51004dcb A |
1 | /* |
2 | * | |
3 | * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved | |
4 | * | |
5 | */ | |
6 | ||
7 | #include "LETypes.h" | |
8 | #include "MorphTables.h" | |
9 | #include "SubtableProcessor2.h" | |
10 | #include "NonContextualGlyphSubst.h" | |
11 | #include "NonContextualGlyphSubstProc2.h" | |
12 | #include "SimpleArrayProcessor2.h" | |
13 | #include "SegmentSingleProcessor2.h" | |
14 | #include "SegmentArrayProcessor2.h" | |
15 | #include "SingleTableProcessor2.h" | |
16 | #include "TrimmedArrayProcessor2.h" | |
17 | #include "LESwaps.h" | |
18 | ||
19 | U_NAMESPACE_BEGIN | |
20 | ||
21 | NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2() | |
22 | { | |
23 | } | |
24 | ||
57a6839d A |
25 | NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2( |
26 | const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success) | |
27 | : SubtableProcessor2(morphSubtableHeader, success) | |
51004dcb A |
28 | { |
29 | } | |
30 | ||
31 | NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2() | |
32 | { | |
33 | } | |
34 | ||
57a6839d A |
35 | SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance( |
36 | const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success) | |
51004dcb | 37 | { |
57a6839d A |
38 | const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success); |
39 | if(LE_FAILURE(success)) return NULL; | |
51004dcb A |
40 | |
41 | switch (SWAPW(header->table.format)) | |
42 | { | |
43 | case ltfSimpleArray: | |
57a6839d | 44 | return new SimpleArrayProcessor2(morphSubtableHeader, success); |
51004dcb A |
45 | |
46 | case ltfSegmentSingle: | |
57a6839d | 47 | return new SegmentSingleProcessor2(morphSubtableHeader, success); |
51004dcb A |
48 | |
49 | case ltfSegmentArray: | |
57a6839d | 50 | return new SegmentArrayProcessor2(morphSubtableHeader, success); |
51004dcb A |
51 | |
52 | case ltfSingleTable: | |
57a6839d | 53 | return new SingleTableProcessor2(morphSubtableHeader, success); |
51004dcb A |
54 | |
55 | case ltfTrimmedArray: | |
57a6839d | 56 | return new TrimmedArrayProcessor2(morphSubtableHeader, success); |
51004dcb A |
57 | |
58 | default: | |
59 | return NULL; | |
60 | } | |
61 | } | |
62 | ||
63 | U_NAMESPACE_END |