]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/layout/GDEFMarkFilter.cpp
ICU-59180.0.1.tar.gz
[apple/icu.git] / icuSources / layout / GDEFMarkFilter.cpp
... / ...
CommitLineData
1/*
2 *
3 * (C) Copyright IBM Corp. 1998 - 2013 - All Rights Reserved
4 *
5 */
6
7#include "LETypes.h"
8#include "LEGlyphFilter.h"
9#include "GDEFMarkFilter.h"
10#include "GlyphDefinitionTables.h"
11
12U_NAMESPACE_BEGIN
13
14GDEFMarkFilter::GDEFMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success)
15 : classDefTable(gdefTable->getGlyphClassDefinitionTable(gdefTable, success))
16{
17 if(!classDefTable.isValid()) {
18 success = LE_INTERNAL_ERROR;
19 }
20}
21
22GDEFMarkFilter::~GDEFMarkFilter()
23{
24 // nothing to do?
25}
26
27le_bool GDEFMarkFilter::accept(LEGlyphID glyph) const
28{
29 le_int32 glyphClass = classDefTable->getGlyphClass(glyph);
30
31 return glyphClass == gcdMarkGlyph;
32}
33
34U_NAMESPACE_END