2013-02-06 07:01:19 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (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()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-18 21:24:51 +00:00
|
|
|
NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(
|
|
|
|
const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
|
|
|
|
: SubtableProcessor2(morphSubtableHeader, success)
|
2013-02-06 07:01:19 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-18 21:24:51 +00:00
|
|
|
SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(
|
|
|
|
const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
|
2013-02-06 07:01:19 +00:00
|
|
|
{
|
2013-04-18 21:24:51 +00:00
|
|
|
const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
|
|
|
|
if(LE_FAILURE(success)) return NULL;
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
switch (SWAPW(header->table.format))
|
|
|
|
{
|
|
|
|
case ltfSimpleArray:
|
2013-04-18 21:24:51 +00:00
|
|
|
return new SimpleArrayProcessor2(morphSubtableHeader, success);
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
case ltfSegmentSingle:
|
2013-04-18 21:24:51 +00:00
|
|
|
return new SegmentSingleProcessor2(morphSubtableHeader, success);
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
case ltfSegmentArray:
|
2013-04-18 21:24:51 +00:00
|
|
|
return new SegmentArrayProcessor2(morphSubtableHeader, success);
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
case ltfSingleTable:
|
2013-04-18 21:24:51 +00:00
|
|
|
return new SingleTableProcessor2(morphSubtableHeader, success);
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
case ltfTrimmedArray:
|
2013-04-18 21:24:51 +00:00
|
|
|
return new TrimmedArrayProcessor2(morphSubtableHeader, success);
|
2013-02-06 07:01:19 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|