co_ecs 0.9.0
Cobalt ECS
Loading...
Searching...
No Matches
co_ecs::schedule Class Reference

Manages the execution of systems in different stages. More...

#include <schedule.hpp>

Public Member Functions

template<typename... Args>
auto add_init_system (Args &&... args) -> self_type &
 Adds an initialization system to the initial stage.
 
auto begin_stage (std::string_view name={}) -> stage &
 Begins a new stage in the schedule.
 
auto create_executor (registry &registry, void *user_context=nullptr) -> std::unique_ptr< schedule_executor >
 Creates an executor for the schedule.
 

Detailed Description

Manages the execution of systems in different stages.

Member Function Documentation

◆ add_init_system()

template<typename... Args>
auto co_ecs::schedule::add_init_system ( Args &&... args) -> self_type&
inline

Adds an initialization system to the initial stage.

This function adds a system to the initialization stage, which is executed before other stages.

Parameters
argsArguments for the system to be added.
Returns
Reference to this schedule object.

◆ begin_stage()

auto co_ecs::schedule::begin_stage ( std::string_view name = {}) -> stage&
inline

Begins a new stage in the schedule.

This function creates a new stage with the given name and adds it to the schedule.

Parameters
nameName of the stage to be created.
Returns
Reference to the newly created stage.

◆ create_executor()

auto co_ecs::schedule::create_executor ( registry & registry,
void * user_context = nullptr ) -> std::unique_ptr<schedule_executor>
inline

Creates an executor for the schedule.

This function creates a schedule executor, which is responsible for running the stages of the schedule.

Parameters
registryReference to the registry object.
user_contextOptional user context.
Returns
Unique pointer to the created schedule executor.

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