OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WPredicateHelper::ArbitraryPredicate< T, Predicate > Class Template Reference

The actual class implementing the predicate evaluation. More...

#include <WPredicateHelper.h>

+ Inheritance diagram for WPredicateHelper::ArbitraryPredicate< T, Predicate >:
+ Collaboration diagram for WPredicateHelper::ArbitraryPredicate< T, Predicate >:

Public Member Functions

 ArbitraryPredicate (Predicate predicate)
 Creates instance. More...
 
virtual ~ArbitraryPredicate ()
 Destructor. More...
 
virtual bool operator() (T const &inst) const
 Checks the instance of T against an arbitrary predicate. More...
 
- Public Member Functions inherited from WPredicateHelper::ArbitraryPredicateBase< T >
 ArbitraryPredicateBase ()
 Creates instance. More...
 
virtual ~ArbitraryPredicateBase ()
 Destructor. More...
 

Private Attributes

Predicate m_predicate
 The predicate to use for checking. More...
 

Detailed Description

template<typename T, typename Predicate = boost::function1< bool, T >>
class WPredicateHelper::ArbitraryPredicate< T, Predicate >

The actual class implementing the predicate evaluation.

The default predicate is a functor evaluating to true or false. For more details see ArbitraryPredicateBase.

Template Parameters
Tthe type to check. This usually is the type of the elements in a list or similar.
Predicatethis is the predicate type. By default, it is a functor.

Definition at line 185 of file WPredicateHelper.h.

Constructor & Destructor Documentation

◆ ArbitraryPredicate()

template<typename T , typename Predicate = boost::function1< bool, T >>
WPredicateHelper::ArbitraryPredicate< T, Predicate >::ArbitraryPredicate ( Predicate  predicate)
inlineexplicit

Creates instance.

Parameters
predicatethe predicate used for checking

Definition at line 193 of file WPredicateHelper.h.

◆ ~ArbitraryPredicate()

template<typename T , typename Predicate = boost::function1< bool, T >>
virtual WPredicateHelper::ArbitraryPredicate< T, Predicate >::~ArbitraryPredicate ( )
inlinevirtual

Destructor.

Definition at line 202 of file WPredicateHelper.h.

Member Function Documentation

◆ operator()()

template<typename T , typename Predicate = boost::function1< bool, T >>
virtual bool WPredicateHelper::ArbitraryPredicate< T, Predicate >::operator() ( T const &  inst) const
inlinevirtual

Checks the instance of T against an arbitrary predicate.

Parameters
instthe value to check against a predicate
Returns
true if predicate evaluates to true

Implements WPredicateHelper::ArbitraryPredicateBase< T >.

Definition at line 213 of file WPredicateHelper.h.

References WPredicateHelper::ArbitraryPredicate< T, Predicate >::m_predicate.

Member Data Documentation

◆ m_predicate

template<typename T , typename Predicate = boost::function1< bool, T >>
Predicate WPredicateHelper::ArbitraryPredicate< T, Predicate >::m_predicate
private

The predicate to use for checking.

Definition at line 222 of file WPredicateHelper.h.

Referenced by WPredicateHelper::ArbitraryPredicate< T, Predicate >::operator()().


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