![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/iter-explorer.hpp"
Decorator for IterExplorer to cut iteration once a predicate ceases to be true. Similar to Filter, the given functor is adapted as appropriate, yet is required to yield a bool convertible result. The functor will be evaluated whenever the »exhausted« state of the resulting iterator is checked, on each access and before iteration; this evaluation is not cached (and thus could also detect ongoing state changes by side-effect).
expandChildern()) Definition at line 1379 of file iter-explorer.hpp.
Public Member Functions | |
| StopTrigger ()=default | |
| template<typename FUN > | |
| StopTrigger (SRC &&dataSrc, FUN &&condition) | |
| bool | checkPoint () const |
| adapt the iteration control API for IterableDecorator: check the stop condition first and block eventually | |
Public Member Functions inherited from IterStateCore< SRC > | |
| bool | checkPoint () const |
| IT::reference | yield () const |
| void | iterNext () |
Private Types | |
| using | Core = IterStateCore< SRC > |
| using | Cond = function< bool(SRC &)> |
Private Attributes | |
| Cond | whileCondition_ |
Additional Inherited Members | |
Protected Member Functions inherited from IterStateCore< SRC > | |
| SRC & | srcIter () const |
|
default |
|
inline |
Definition at line 1395 of file iter-explorer.hpp.
|
private |
Definition at line 1384 of file iter-explorer.hpp.
|
private |
Definition at line 1385 of file iter-explorer.hpp.
|
inline |
adapt the iteration control API for IterableDecorator: check the stop condition first and block eventually
Definition at line 1404 of file iter-explorer.hpp.
References IterStateCore< SRC >::checkPoint(), IterStateCore< SRC >::srcIter(), and StopTrigger< SRC >::whileCondition_.
Here is the call graph for this function:
|
private |
Definition at line 1387 of file iter-explorer.hpp.
Referenced by StopTrigger< SRC >::checkPoint().
Inheritance diagram for StopTrigger< SRC >:
Collaboration diagram for StopTrigger< SRC >: