Skip to main content

CallableSystem Class Template

ECS system that executes a stored lambda on each update. More...

Declaration​

template <typename THandle, typename TFunc> class helios::engine::core::systems::CallableSystem<THandle, TFunc> { ... }

Public Member Typedefs Index​

template <typename THandle, typename TFunc>
usingEngineRoleTag = CallableSystemRole

Public Constructors Index​

template <typename THandle, typename TFunc>
CallableSystem (TFunc lambda)

Creates the system from an update callback. More...

Public Member Functions Index​

template <typename THandle, typename TFunc>
voidupdate (UpdateContext &updateContext) noexcept

Executes the stored callback for the current update step. More...

Private Member Attributes Index​

template <typename THandle, typename TFunc>
TFunclambda_

Description​

ECS system that executes a stored lambda on each update.

Template Parameters
THandle

Handle type used by the surrounding system graph.

TFunc

lambda function type

Definition at line 36 of file CallableSystem.ixx.

Public Member Typedefs​

EngineRoleTag​

template <typename THandle, typename TFunc>
using helios::engine::core::systems::CallableSystem< THandle, TFunc >::EngineRoleTag = CallableSystemRole

Definition at line 42 of file CallableSystem.ixx.

Public Constructors​

CallableSystem()​

template <typename THandle, typename TFunc>
helios::engine::core::systems::CallableSystem< THandle, TFunc >::CallableSystem (TFunc lambda)
inline explicit

Creates the system from an update callback.

Parameters
lambda

Callback executed in update.

Definition at line 48 of file CallableSystem.ixx.

48 explicit CallableSystem(TFunc lambda) : lambda_(std::move(lambda)) {}

Public Member Functions​

update()​

template <typename THandle, typename TFunc>
void helios::engine::core::systems::CallableSystem< THandle, TFunc >::update (UpdateContext & updateContext)
inline noexcept

Executes the stored callback for the current update step.

Parameters
updateContext

Runtime context of the engine update.

Definition at line 55 of file CallableSystem.ixx.

56 std::invoke(lambda_, updateContext);
57 }

Reference helios::engine::core::registerComponents.

Private Member Attributes​

lambda_​

template <typename THandle, typename TFunc>
TFunc helios::engine::core::systems::CallableSystem< THandle, TFunc >::lambda_

Definition at line 38 of file CallableSystem.ixx.

38 TFunc lambda_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.