]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/NonContextualGlyphSubstProc.cpp
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / layout / NonContextualGlyphSubstProc.cpp
CommitLineData
b75a7d8f 1/*
b75a7d8f 2 *
374ca955 3 * (C) Copyright IBM Corp. 1998-2004 - 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
19U_NAMESPACE_BEGIN
20
21NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor()
22{
23}
24
25NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
374ca955 26 : SubtableProcessor(morphSubtableHeader)
b75a7d8f
A
27{
28}
29
30NonContextualGlyphSubstitutionProcessor::~NonContextualGlyphSubstitutionProcessor()
31{
32}
33
34SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const MorphSubtableHeader *morphSubtableHeader)
35{
36 const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
37
38 switch (SWAPW(header->table.format))
39 {
40 case ltfSimpleArray:
41 return new SimpleArrayProcessor(morphSubtableHeader);
42
43 case ltfSegmentSingle:
44 return new SegmentSingleProcessor(morphSubtableHeader);
45
46 case ltfSegmentArray:
47 return new SegmentArrayProcessor(morphSubtableHeader);
48
49 case ltfSingleTable:
50 return new SingleTableProcessor(morphSubtableHeader);
51
52 case ltfTrimmedArray:
53 return new TrimmedArrayProcessor(morphSubtableHeader);
54
55 default:
56 return NULL;
57 }
58}
59
60U_NAMESPACE_END