File: NonContextualGlyphSubstProc2.cpp

package info (click to toggle)
icu 52.1-8
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 112,788 kB
  • sloc: cpp: 337,445; ansic: 162,558; makefile: 5,336; sh: 4,005; xml: 3,707; perl: 3,054; python: 460; sed: 35
file content (63 lines) | stat: -rw-r--r-- 1,785 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 *
 * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
 *
 */

#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor2.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc2.h"
#include "SimpleArrayProcessor2.h"
#include "SegmentSingleProcessor2.h"
#include "SegmentArrayProcessor2.h"
#include "SingleTableProcessor2.h"
#include "TrimmedArrayProcessor2.h"
#include "LESwaps.h"

U_NAMESPACE_BEGIN

NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2()
{
}

NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(
     const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
  : SubtableProcessor2(morphSubtableHeader, success)
{
}

NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
{
}

SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(
      const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
{
    const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
    if(LE_FAILURE(success)) return NULL;

    switch (SWAPW(header->table.format))
    {
    case ltfSimpleArray:
      return new SimpleArrayProcessor2(morphSubtableHeader, success);

    case ltfSegmentSingle:
      return new SegmentSingleProcessor2(morphSubtableHeader, success);

    case ltfSegmentArray:
      return new SegmentArrayProcessor2(morphSubtableHeader, success);

    case ltfSingleTable:
      return new SingleTableProcessor2(morphSubtableHeader, success);

    case ltfTrimmedArray:
      return new TrimmedArrayProcessor2(morphSubtableHeader, success);

    default:
        return NULL;
    }
}

U_NAMESPACE_END