CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates > Struct Template Reference

A predicate implementation that performs a logical OR between other predicates. More...

#include <CeresEngine/Foundation/Predicate.hpp>

Inheritance diagram for CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >:
CeresEngine::Predicate< OrPredicate< Predicate1, Predicate2, Predicates... > >

Public Member Functions

constexpr OrPredicate (Predicate1 &&predicate1, Predicate2 &&predicate2, Predicates &&... predicates) noexcept
 Creates a new OrPredicate.
 
template<typename... Input>
constexpr bool operator() (Input &&... input) const
 Executes the predicate.
 

Public Attributes

Tuple< Predicate1, Predicate2, Predicates... > predicates
 A tuple containing the predicates to apply the logical OR on.
 

Private Member Functions

template<size_t N, typename... Input>
constexpr bool impl (Input &... input) const
 

Detailed Description

template<typename Predicate1, typename Predicate2, typename... Predicates>
struct CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >

A predicate implementation that performs a logical OR between other predicates.

Template Parameters
Predicate1the first predicate
Predicate2the second predicate
Predicatesthe remaining predicates

Constructor & Destructor Documentation

◆ OrPredicate()

template<typename Predicate1 , typename Predicate2 , typename... Predicates>
constexpr CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >::OrPredicate ( Predicate1 &&  predicate1,
Predicate2 &&  predicate2,
Predicates &&...  predicates 
)
inlineconstexprnoexcept

Creates a new OrPredicate.

Parameters
predicate1The first predicate
predicate2The second predicate
predicatesThe remaining predicates

Member Function Documentation

◆ impl()

template<typename Predicate1 , typename Predicate2 , typename... Predicates>
template<size_t N, typename... Input>
constexpr bool CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >::impl ( Input &...  input) const
inlineconstexprprivate

◆ operator()()

template<typename Predicate1 , typename Predicate2 , typename... Predicates>
template<typename... Input>
constexpr bool CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >::operator() ( Input &&...  input) const
inlineconstexpr

Executes the predicate.

Template Parameters
Inputthe predicate input types
Parameters
inputThe predicate inputs
Returns
The predicate evaluation result

Member Data Documentation

◆ predicates

template<typename Predicate1 , typename Predicate2 , typename... Predicates>
Tuple<Predicate1, Predicate2, Predicates...> CeresEngine::OrPredicate< Predicate1, Predicate2, Predicates >::predicates

A tuple containing the predicates to apply the logical OR on.


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