Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs::CommandTrait Concept Reference

Concept that defines the requirements for a command trait. More...

#include <command.hpp>

Concept definition

template<typename T>
concept CommandTrait =
std::destructible<T> &&
(std::move_constructible<T> || std::copy_constructible<T>) &&
std::is_object_v<std::remove_cvref_t<T>> &&
!std::is_polymorphic_v<std::remove_cvref_t<T>> &&
requires(T command, helios::ecs::World& world) {
{ command.Execute(world) } -> std::same_as<void>;
}
The World class manages entities with their components and systems.
Definition world.hpp:39
Concept that defines the requirements for a command trait.
Definition command.hpp:18

Detailed Description

Concept that defines the requirements for a command trait.

A command must be destructible, move or copy constructible, be an object, not polymorphic, and must have an Execute with signature (helios::ecs::World&) -> void.

Template Parameters
TThe type to check for the command trait

Definition at line 18 of file command.hpp.