CallableSystem.ixx File
Small ECS system wrapper around an update lambda. More...
Included Headers
#include <memory>
#include <functional>
#include <type_traits>
#include <utility>
#include <helios.ecs.components>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.world.tags.SystemRole>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | core |
| namespace | systems |
| namespace | components |
Classes Index
| class | CallableSystem<THandle, TFunc> |
|
ECS system that executes a stored lambda on each update. More... | |
Description
Small ECS system wrapper around an update lambda.
File Listing
The file content with the documentation metadata removed is:
20using namespace helios::engine::runtime::world;
21using namespace helios::engine::runtime::world::tags;
23export namespace helios::engine::core::systems {
32 class CallableSystem {
34 TFunc lambda_;
38 using EngineRoleTag = CallableSystemRole;
51 void update(UpdateContext& updateContext) noexcept {
52 std::invoke(lambda_, updateContext);
68 [[nodiscard]] auto callableSystemForLambda(TFunc&& func) {
69 using FuncType = std::remove_cvref_t<TFunc>;
71 return CallableSystem<THandle, FuncType>(std::forward<TFunc>(func));
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.