5891N/A/*
5891N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5891N/A *
5891N/A * This code is free software; you can redistribute it and/or modify it
5891N/A * under the terms of the GNU General Public License version 2 only, as
5891N/A * published by the Free Software Foundation. Oracle designates this
5891N/A * particular file as subject to the "Classpath" exception as provided
5891N/A * by Oracle in the LICENSE file that accompanied this code.
5891N/A *
5891N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5891N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5891N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5891N/A * version 2 for more details (a copy is included in the LICENSE file that
5891N/A * accompanied this code).
5891N/A *
5891N/A * You should have received a copy of the GNU General Public License version
5891N/A * 2 along with this work; if not, write to the Free Software Foundation,
5891N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5891N/A *
5891N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5891N/A * or visit www.oracle.com if you need additional information or have any
5891N/A * questions.
5891N/A *
5891N/A */
5891N/A
5891N/A/*
5891N/A *
5891N/A * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
5891N/A *
5891N/A */
5891N/A
5891N/A#include "LETypes.h"
5891N/A#include "MorphTables.h"
5891N/A#include "SubtableProcessor2.h"
5891N/A#include "NonContextualGlyphSubst.h"
5891N/A#include "NonContextualGlyphSubstProc2.h"
5891N/A#include "SimpleArrayProcessor2.h"
5891N/A#include "SegmentSingleProcessor2.h"
5891N/A#include "SegmentArrayProcessor2.h"
5891N/A#include "SingleTableProcessor2.h"
5891N/A#include "TrimmedArrayProcessor2.h"
5891N/A#include "LESwaps.h"
5891N/A
5891N/AU_NAMESPACE_BEGIN
5891N/A
5891N/ANonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2()
5891N/A{
5891N/A}
5891N/A
5980N/ANonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(
5980N/A const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
5980N/A : SubtableProcessor2(morphSubtableHeader, success)
5891N/A{
5891N/A}
5891N/A
5891N/ANonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
5891N/A{
5891N/A}
5891N/A
5980N/ASubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(
5980N/A const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
5891N/A{
5980N/A const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
5980N/A if(LE_FAILURE(success)) return NULL;
5891N/A
5891N/A switch (SWAPW(header->table.format))
5891N/A {
5891N/A case ltfSimpleArray:
5980N/A return new SimpleArrayProcessor2(morphSubtableHeader, success);
5891N/A
5891N/A case ltfSegmentSingle:
5980N/A return new SegmentSingleProcessor2(morphSubtableHeader, success);
5891N/A
5891N/A case ltfSegmentArray:
5980N/A return new SegmentArrayProcessor2(morphSubtableHeader, success);
5891N/A
5891N/A case ltfSingleTable:
5980N/A return new SingleTableProcessor2(morphSubtableHeader, success);
5891N/A
5891N/A case ltfTrimmedArray:
5980N/A return new TrimmedArrayProcessor2(morphSubtableHeader, success);
5891N/A
5891N/A default:
5891N/A return NULL;
5891N/A }
5891N/A}
5891N/A
5891N/AU_NAMESPACE_END