CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ComponentPredicate< Cs > Struct Template Reference

A predicate that checks if the given entity has all components in Cs. More...

#include <CeresEngine/Entity/EntityPredicate.hpp>

Inheritance diagram for CeresEngine::ComponentPredicate< Cs >:
CeresEngine::Predicate< ComponentPredicate< Cs... > >

Public Member Functions

bool operator() (const Entity &entity) const noexcept
 Executes the predicate.
 

Detailed Description

template<CComponent... Cs>
struct CeresEngine::ComponentPredicate< Cs >

A predicate that checks if the given entity has all components in Cs.

Template Parameters
Csthe component types to be checked for existence

Member Function Documentation

◆ operator()()

template<CComponent... Cs>
bool CeresEngine::ComponentPredicate< Cs >::operator() ( const Entity entity) const
inlinenoexcept

Executes the predicate.

Parameters
entityThe entity to execute the predicate against
Returns
true if the entity has all components in ´Cs,false` otherwise.

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