class LayoutFilter : public IlvLayoutGraphicFilter { public: LayoutFilter() { } IlBoolean accept(IlvGraphic* obj) { IlAny prop = obj->getProperty(IlGetSymbol(FILTER_PROP)); if (!prop) return IlFalse; // accept a link only if its two end-nodes are accepted if (obj->isSubtypeOf(IlvLinkImage::ClassInfo()->getClassName())) { IlvLinkImage* link = (IlvLinkImage*)obj; return (link->getFrom()->getProperty(IlGetSymbol(FILTER_PROP)) && link->getTo()->getProperty(IlGetSymbol(FILTER_PROP))); } return IlTrue; } }; |