Lumiera  0.pre.03
»edit your freedom«
FilterCore< IT > Struct Template Reference

#include "lib/itertools.hpp"

Description

template<class IT>
struct lib::FilterCore< IT >

Implementation of the filter logic.

This core stores a function object instance, passing each pulled source element to this predicate function for evaluation.

Note
predicate is evaluated at most once for each value yielded by the source

Definition at line 288 of file itertools.hpp.

Public Types

using Raw = IdentityCore< IT >
 
using Val = typename IT::reference
 
- Public Types inherited from IdentityCore< IT >
typedef IT::pointer pointer
 
typedef IT::reference reference
 
typedef IT::value_type value_type
 

Public Member Functions

template<typename PRED >
 FilterCore (IT &&source, PRED prediDef)
 
template<typename PRED >
 FilterCore (IT const &source, PRED prediDef)
 
void advance ()
 
bool currVal_isOK () const
 < More...
 
bool evaluate () const
 
- Public Member Functions inherited from IdentityCore< IT >
 IdentityCore (IT &&orig)
 
 IdentityCore (IT const &orig)
 
void advance ()
 
bool evaluate () const
 
IT & pipe ()
 
IT const & pipe () const
 

Public Attributes

bool cached_
 
bool isOK_
 
function< bool(Val)> predicate_
 
- Public Attributes inherited from IdentityCore< IT >
IT source_
 

Member Function Documentation

◆ currVal_isOK()

bool currVal_isOK ( ) const
inline

<

Returns
(maybe cached) result of filter predicate

Definition at line 309 of file itertools.hpp.

+ Inheritance diagram for FilterCore< IT >:
+ Collaboration diagram for FilterCore< IT >:

The documentation for this struct was generated from the following file: