CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::EntityActionHandler< A > Class Template Referenceabstract

#include <CeresEngine/Entity/ActionHandler.hpp>

Inheritance diagram for CeresEngine::EntityActionHandler< A >:
CeresEngine::AbstractActionHandler

Public Types

using Action = A
 The action type handled by the handler.
 
using ReturnType = typename A::ReturnType
 The return type required by the action type.
 

Public Member Functions

virtual bool canAct (const Entity &entity, const A &action) noexcept
 Checks if the given handler can act on the given action.
 
virtual ReturnType act (Entity &entity, const A &action)=0
 Runs an action.
 
- Public Member Functions inherited from CeresEngine::AbstractActionHandler
virtual ~AbstractActionHandler ()=default
 Destroys the AbstractActionHandler.
 

Member Typedef Documentation

◆ Action

The action type handled by the handler.

◆ ReturnType

template<typename A >
using CeresEngine::EntityActionHandler< A >::ReturnType = typename A::ReturnType

The return type required by the action type.

Member Function Documentation

◆ act()

template<typename A >
virtual ReturnType CeresEngine::EntityActionHandler< A >::act ( Entity entity,
const A action 
)
pure virtual

Runs an action.

Parameters
entityThe entity to be acted upon
actionThe action to be ran

Implemented in CeresEngine::NetworkActionHandler< A >.

◆ canAct()

template<typename A >
virtual bool CeresEngine::EntityActionHandler< A >::canAct ( const Entity entity,
const A action 
)
inlinevirtualnoexcept

Checks if the given handler can act on the given action.

Parameters
entityThe entity to be acted upon
actionThe action to be ran

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