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 19U_NAMESPACE_BEGIN 20 21NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2() 22{ 23} 24 25NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) 26 : SubtableProcessor2(morphSubtableHeader) 27{ 28} 29 30NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2() 31{ 32} 33 34SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(const MorphSubtableHeader2 *morphSubtableHeader) 35{ 36 const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; 37 38 switch (SWAPW(header->table.format)) 39 { 40 case ltfSimpleArray: 41 return new SimpleArrayProcessor2(morphSubtableHeader); 42 43 case ltfSegmentSingle: 44 return new SegmentSingleProcessor2(morphSubtableHeader); 45 46 case ltfSegmentArray: 47 return new SegmentArrayProcessor2(morphSubtableHeader); 48 49 case ltfSingleTable: 50 return new SingleTableProcessor2(morphSubtableHeader); 51 52 case ltfTrimmedArray: 53 return new TrimmedArrayProcessor2(morphSubtableHeader); 54 55 default: 56 return NULL; 57 } 58} 59 60U_NAMESPACE_END 61