OpenWalnut  1.4.0
Public Member Functions | Private Attributes
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 >:

List of all members.

Public Member Functions

 ArbitraryPredicate (Predicate predicate)
 Creates instance.
virtual ~ArbitraryPredicate ()
 Destructor.
virtual bool operator() (T const &inst) const
 Checks the instance of T against an arbitrary predicate.

Private Attributes

Predicate m_predicate
 The predicate to use for checking.

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

template<typename T , typename Predicate = boost::function1< bool, T >>
WPredicateHelper::ArbitraryPredicate< T, Predicate >::ArbitraryPredicate ( Predicate  predicate) [inline, explicit]

Creates instance.

Parameters:
predicatethe predicate used for checking

Definition at line 193 of file WPredicateHelper.h.

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

Destructor.

Definition at line 202 of file WPredicateHelper.h.


Member Function Documentation

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

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

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 216 of file WPredicateHelper.h.

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


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