+class CanonMarkFilter : public UMemory, public LEGlyphFilter
+{
+private:
+ const GlyphClassDefinitionTable *classDefTable;
+
+ CanonMarkFilter(const CanonMarkFilter &other); // forbid copying of this class
+ CanonMarkFilter &operator=(const CanonMarkFilter &other); // forbid copying of this class
+
+public:
+ CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable);
+ virtual ~CanonMarkFilter();
+
+ virtual le_bool accept(LEGlyphID glyph) const;
+};
+
+CanonMarkFilter::CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable)
+{
+ classDefTable = gdefTable->getMarkAttachClassDefinitionTable();
+}
+
+CanonMarkFilter::~CanonMarkFilter()
+{
+ // nothing to do?
+}
+
+le_bool CanonMarkFilter::accept(LEGlyphID glyph) const
+{
+ le_int32 glyphClass = classDefTable->getGlyphClass(glyph);
+
+ return glyphClass != 0;
+}