![]() |
Lumiera 0.pre.04
»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 | |
| Filter ()=default | |
| template<typename FUN > | |
| Filter (SRC &&dataSrc, FUN &&filterFun) | |
| void | expandChildren () |
| refresh state when other layers manipulate the source sequence. | |
| bool | checkPoint () const |
| SRC::reference | yield () const |
| void | iterNext () |
Protected Types | |
| using | FilterPredicate = function< bool(SRC &)> |
Protected Member Functions | |
| SRC & | srcIter () const |
| bool | isDisabled () const |
| void | pullFilter () |
Protected Attributes | |
| FilterPredicate | predicate_ |
|
default |
Definition at line 1130 of file iter-explorer.hpp.
References Filter< SRC >::pullFilter().
Here is the call graph for this function:
|
protected |
Definition at line 1120 of file iter-explorer.hpp.
|
inline |
refresh state when other layers manipulate the source sequence.
Definition at line 1141 of file iter-explorer.hpp.
References Filter< SRC >::pullFilter().
Here is the call graph for this function:
|
inline |
Definition at line 1150 of file iter-explorer.hpp.
References Filter< SRC >::srcIter().
Here is the call graph for this function:
|
inline |
Definition at line 1156 of file iter-explorer.hpp.
References Filter< SRC >::srcIter().
Here is the call graph for this function:
|
inline |
Definition at line 1162 of file iter-explorer.hpp.
References Filter< SRC >::pullFilter(), and Filter< SRC >::srcIter().
Here is the call graph for this function:
|
inlineprotected |
Definition at line 1171 of file iter-explorer.hpp.
Referenced by Filter< SRC >::checkPoint(), Filter< SRC >::iterNext(), Filter< SRC >::pullFilter(), and Filter< SRC >::yield().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 1177 of file iter-explorer.hpp.
References Filter< SRC >::predicate_.
Referenced by Filter< SRC >::pullFilter().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 1186 of file iter-explorer.hpp.
References Filter< SRC >::isDisabled(), Filter< SRC >::predicate_, and Filter< SRC >::srcIter().
Referenced by Filter< SRC >::Filter(), Filter< SRC >::expandChildren(), and Filter< SRC >::iterNext().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 1122 of file iter-explorer.hpp.
Referenced by Filter< SRC >::isDisabled(), and Filter< SRC >::pullFilter().
Inheritance diagram for Filter< SRC >:
Collaboration diagram for Filter< SRC >: