|
CppGraph Application Framework©
Copyright © 2004-202x Geoff Goldberg
|
Some operations allow a filter to be specified. A filter distinguishes objects that are to be operated on from those that are not.
Filters implement a boolean function that takes an object as a parameter and returns true if that object passes the filter. There are several filter class hierarchies, corresponding to the type of object they filter. There are a large number of predefined filters. The user is free to implement others.
Operations that use filters include:
To determine if a specific filter instance passes a specific item instance, use passes_filter().
Types of filter hierarchies include the following:
A function that takes a filter argument specifies one of these types as its filter parameter.
Each filter hierarchy includes, at a minimum, implementations of the following filter types:
any_<xxx>_filternone_<xxx>_filternot_<xxx>_filteror_<xxx>_filterand_<xxx>_filterShortcut free functions are provided to construct filters that implement some of the more complex, but commonly-used patterns,
Filter classes are derived from node. Therefore, node capabilities apply to instances of them.
The filtering feature is motivated by:
nullptr. A filter with this value is treated as an any_<xxx>_filter, passing all objects.
1.8.14