Skip to content

ENH: Adding Custom Filter Support for Attributes

Properties on Definitions can now be inherited by Attributes and derived Definitions when creating queries and association rules.

For example if Definition A has a floating-point property "alpha" with value 5.0, and if Definition B is derived from A and Attribute a is from A and Attribute b is from B, then all would match the rule "any[ floating-point { 'alpha' = 5.0 }]". If later B was to also have floating-point property "alpha" with value 10.0 associated with it, it would "override" the value coming from A so both it and b would no longer pass the rule. Similarly, properties on Attributes can "override" the values coming from its Definition.

Note That this does not mean that the properties() methods for Attributes and Definitions will return inherited values.

See smtk/attribute/testing/c++/unitPropertiesFilter.cxx and data/attribute/propertiesFilterExample.sbt for examples.

Edited by Robert M. O'Bara

Merge request reports