template<class SRC>
class lib::iter_explorer::MutableFilter< SRC >
Special variant of the Filter Decorator to allow for dynamic remoulding. This covers a rather specific use case, where we want to remould or even exchange the Filter predicate in the middle of an ongoing iteration. Such a remoulding can be achieved by binding the existing (opaque) filter predicate into a new combined lambda, thereby capturing it by value. After building, this remoulded version can be assigned to the original filter functor, under the assumption that both are roughly compatible. Moreover, since we wrap the actual lambda into an adapter, allowing for generic lambdas to be used as filter predicates, this setup allows for a lot of leeway regarding the concrete predicates.
- Note
- whenever the filter is remoulded, the invariant is immediately re-established, possibly forwarding the sequence to the next element approved by the new version of the filter.
Definition at line 1185 of file iter-explorer.hpp.
|
template<typename FUN > |
| MutableFilter (SRC &&dataSrc, FUN &&filterFun) |
|
template<typename COND > |
void | andFilter (COND &&conjunctiveClause) |
| remould existing predicate to require in addition the given clause to hold
|
|
template<typename COND > |
void | andNotFilter (COND &&conjunctiveClause) |
| remould existing predicate to require in addition the negation of the given clause to hold
|
|
void | disableFilter () |
| discard filter predicates and disable any filtering
|
|
void | flipFilter () |
| remould existing predicate to negate the meaning of the existing clause
|
|
template<typename COND > |
void | orFilter (COND &&disjunctiveClause) |
| remould existing predicate to require either the old OR the given new clause to hold
|
|
template<typename COND > |
void | orNotFilter (COND &&disjunctiveClause) |
| remould existing predicate to require either the old OR the negation of a new clause to hold
|
|
template<typename COND > |
void | setNewFilter (COND &&entirelyDifferentPredicate) |
| replace the existing predicate with the given, entirely different predicate
|
|
template<typename FUN > |
| Filter (SRC &&dataSrc, FUN &&filterFun) |
|
bool | checkPoint () const |
|
void | expandChildren () |
| refresh state when other layers manipulate the source sequence. More...
|
|
void | iterNext () |
|
SRC::reference | yield () const |
|