CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::EntityManager::QueryExecutor< P > Class Template Reference

The query executor is responsible for iterating over entities and filtering them based on a given predicate. More...

#include <CeresEngine/Entity/EntityManager.hpp>

Public Types

using Predicate = P
 The predicate type.
 

Public Member Functions

 QueryExecutor (Predicate &&predicate)
 Creates a new query executor instance.
 
Generator< const Entityoperator() (const EntityManager &entityManager) const noexcept
 Executes the query.
 

Private Attributes

Predicate mPredicate
 The predicate to filter selected entities.
 

Detailed Description

template<typename P>
class CeresEngine::EntityManager::QueryExecutor< P >

The query executor is responsible for iterating over entities and filtering them based on a given predicate.

Implementations can provide an optimized executor by specializing for predicate types.

Template Parameters
Pthe predicate type

Member Typedef Documentation

◆ Predicate

The predicate type.

Constructor & Destructor Documentation

◆ QueryExecutor()

template<typename P >
CeresEngine::EntityManager::QueryExecutor< P >::QueryExecutor ( Predicate &&  predicate)
inlineexplicit

Creates a new query executor instance.

Parameters
predicateThe predicate to filter selected entities

Member Function Documentation

◆ operator()()

Executes the query.

Parameters
entityManagerThe entity manager to execute the query on
Returns
The query result generator

Member Data Documentation

◆ mPredicate

template<typename P >
Predicate CeresEngine::EntityManager::QueryExecutor< P >::mPredicate
private

The predicate to filter selected entities.


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