os/textandloc/fontservices/textshaperplugin/IcuSource/layout/NonContextualGlyphSubstProc.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/textshaperplugin/IcuSource/layout/NonContextualGlyphSubstProc.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +/*
     1.5 + *
     1.6 + * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
     1.7 + *
     1.8 + */
     1.9 +
    1.10 +#include "LETypes.h"
    1.11 +#include "MorphTables.h"
    1.12 +#include "SubtableProcessor.h"
    1.13 +#include "NonContextualGlyphSubst.h"
    1.14 +#include "NonContextualGlyphSubstProc.h"
    1.15 +#include "SimpleArrayProcessor.h"
    1.16 +#include "SegmentSingleProcessor.h"
    1.17 +#include "SegmentArrayProcessor.h"
    1.18 +#include "SingleTableProcessor.h"
    1.19 +#include "TrimmedArrayProcessor.h"
    1.20 +#include "LESwaps.h"
    1.21 +
    1.22 +U_NAMESPACE_BEGIN
    1.23 +
    1.24 +NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor()
    1.25 +{
    1.26 +}
    1.27 +
    1.28 +NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
    1.29 +    : SubtableProcessor(morphSubtableHeader)
    1.30 +{
    1.31 +}
    1.32 +
    1.33 +NonContextualGlyphSubstitutionProcessor::~NonContextualGlyphSubstitutionProcessor()
    1.34 +{
    1.35 +}
    1.36 +
    1.37 +SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const MorphSubtableHeader *morphSubtableHeader)
    1.38 +{
    1.39 +    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
    1.40 +
    1.41 +    switch (SWAPW(header->table.format))
    1.42 +    {
    1.43 +    case ltfSimpleArray:
    1.44 +        return new SimpleArrayProcessor(morphSubtableHeader);
    1.45 +
    1.46 +    case ltfSegmentSingle:
    1.47 +        return new SegmentSingleProcessor(morphSubtableHeader);
    1.48 +
    1.49 +    case ltfSegmentArray:
    1.50 +        return new SegmentArrayProcessor(morphSubtableHeader);
    1.51 +
    1.52 +    case ltfSingleTable:
    1.53 +        return new SingleTableProcessor(morphSubtableHeader);
    1.54 +
    1.55 +    case ltfTrimmedArray:
    1.56 +        return new TrimmedArrayProcessor(morphSubtableHeader);
    1.57 +
    1.58 +    default:
    1.59 +        return NULL;
    1.60 +    }
    1.61 +}
    1.62 +
    1.63 +U_NAMESPACE_END