Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/iter-explorer.hpp"
Decorator for IterExplorer to filter elements based on a predicate. Similar to the Transformer, the given functor is adapted as appropriate. However, we require the functor's result type to be convertible to bool, to serve as approval test. The filter predicate and thus the source iterator is evaluated eagerly, to establish the invariant of this class: if a "current element" exists, it has already been approved.
Definition at line 1114 of file iter-explorer.hpp.
Public Member Functions | |
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 |
Protected Types | |
using | FilterPredicate = function< bool(SRC &)> |
Protected Member Functions | |
bool | isDisabled () const |
void | pullFilter () |
SRC & | srcIter () const |
Protected Attributes | |
FilterPredicate | predicate_ |
|
inline |
refresh state when other layers manipulate the source sequence.
Definition at line 1141 of file iter-explorer.hpp.
|
inlineprotected |
Definition at line 1186 of file iter-explorer.hpp.