#include <CeresEngine/Entity/ActionManager.hpp>
◆ EntityActionManager() [1/3]
| CeresEngine::EntityActionManager::EntityActionManager |
( |
| ) |
|
|
default |
◆ EntityActionManager() [2/3]
◆ EntityActionManager() [3/3]
◆ ~EntityActionManager()
| CeresEngine::EntityActionManager::~EntityActionManager |
( |
| ) |
|
|
default |
◆ act() [1/2]
template<CEntityAction Action, typename... Args>
| Action::ReturnType CeresEngine::EntityActionManager::act |
( |
Entity |
entity, |
|
|
Args &&... |
args |
|
) |
| |
Dispatches an action to a handler.
- Template Parameters
-
| Action | the action type to be dispatched |
| Args | the action constructor argument types |
- Parameters
-
| entity | The entity to be acted on |
| args | The action constructor arguments |
- Returns
- The value returned by the handler
◆ act() [2/2]
template<CEntityAction Action>
| Action::ReturnType CeresEngine::EntityActionManager::act |
( |
Entity |
entity, |
|
|
const Action & |
action |
|
) |
| |
Dispatches an action to a handler.
- Template Parameters
-
| Action | the action type to be dispatched |
- Parameters
-
| entity | The entity to be acted on |
| action | The action constructor arguments |
- Returns
- The value returned by the handler
◆ add() [1/2]
template<CEntityAction A>
Adds a new action handler.
- Template Parameters
-
- Parameters
-
| actionHandler | The action handler instance |
◆ add() [2/2]
Adds a new action handler.
- Parameters
-
| actionID | The action ID that the action handler supports |
| actionHandler | A pointer to the action handler |
◆ canAct() [1/2]
template<CEntityAction Action, typename... Args>
| bool CeresEngine::EntityActionManager::canAct |
( |
Entity |
entity, |
|
|
Args &&... |
args |
|
) |
| const |
|
noexcept |
Checks if the action manager has an action handler that can handle the given action.
The action is constructed in-place.
- Template Parameters
-
| Action | the action type to be checked |
| Args | the constructor argument types |
- Parameters
-
| entity | The entity to check the action for |
| args | The constructor arguments |
- Returns
true if act can be called, false otherwise.
◆ canAct() [2/2]
template<CEntityAction Action>
| bool CeresEngine::EntityActionManager::canAct |
( |
Entity |
entity, |
|
|
const Action & |
action |
|
) |
| |
|
noexcept |
Checks if the action manager has an action handler that can handle the given action.
- Template Parameters
-
| Action | the action type to be checked |
- Parameters
-
| entity | The entity to check the action for |
| action | The action to be checked |
- Returns
true if act can be called, false otherwise.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ remove() [1/2]
template<CEntityAction A>
Removes an existing action handler.
- Template Parameters
-
- Parameters
-
| actionHandler | The action handler instance |
◆ remove() [2/2]
Adds a new action handler.
- Parameters
-
| actionID | The action ID that the action handler supports |
| actionHandler | A pointer to the action handler |
◆ mActionHandlers
The map of action handlers.
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Entity/ActionManager.hpp