#include <core/ecs/system/system.hpp>
template<typename T>
System class
Holds a system with a return type T
.
Template parameters | |
---|---|
T | System return type. |
Public static functions
- static auto make(World& world, auto function, const std::vector<SystemOptions>& options = {}) -> System
- Creates a new system for the given world with the given function and options.
Constructors, destructors, conversion operators
Public functions
- auto run(const SystemContext& ctx) -> T
- Runs the system.
- auto access() const -> const SystemAccess&
- Gets a reference to the access patterns of the system.
Function documentation
template<typename T>
static System cubos:: core:: ecs:: System<T>:: make(World& world,
auto function,
const std::vector<SystemOptions>& options = {})
Creates a new system for the given world with the given function and options.
Parameters | |
---|---|
world | World the system will access. |
function | System function, which should return T . |
options | Options for the system arguments. |
The first option is applied to the first argument which requests it, and the same for subsequent options. If there are more options than arguments which request them, aborts. Otherwise, if there are more arguments requesting options than supplied options, the remaining arguments are assigned default-value options.
template<typename T>
T cubos:: core:: ecs:: System<T>:: run(const SystemContext& ctx)
Runs the system.
Parameters | |
---|---|
ctx | Context. |
Returns | Return value. |
template<typename T>
const SystemAccess& cubos:: core:: ecs:: System<T>:: access() const
Gets a reference to the access patterns of the system.
Returns | Access patterns. |
---|