Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs::Executor Class Referenceabstract

Abstract interface for schedule executors. More...

#include <executor.hpp>

Inheritance diagram for helios::ecs::Executor:
helios::ecs::MainThreadExecutor helios::ecs::MultiThreadedExecutor helios::ecs::SingleThreadedExecutor

Public Member Functions

virtual ~Executor ()=default
virtual void Execute (Schedule &schedule, World &world)=0
 Submits all systems in the schedule for execution.
virtual void ExecuteAndWait (Schedule &schedule, World &world)
 Executes all systems in the schedule and blocks until completion.
virtual void Wait ()
 Blocks until the most recent Execute() completes.

Detailed Description

Abstract interface for schedule executors.

Receives a compiled schedule and world, running all systems according to the execution plan. Implementations determine threading strategy.

Definition at line 27 of file executor.hpp.

Constructor & Destructor Documentation

◆ ~Executor()

virtual helios::ecs::Executor::~Executor ( )
virtualdefault

Member Function Documentation

◆ Execute()

virtual void helios::ecs::Executor::Execute ( Schedule & schedule,
World & world )
pure virtual

Submits all systems in the schedule for execution.

May return before execution completes. Call Wait() to block until completion.

Parameters
scheduleCompiled schedule to execute
worldWorld to pass to each system

Implemented in helios::ecs::MainThreadExecutor, helios::ecs::MultiThreadedExecutor, and helios::ecs::SingleThreadedExecutor.

◆ ExecuteAndWait()

void helios::ecs::Executor::ExecuteAndWait ( Schedule & schedule,
World & world )
inlinevirtual

Executes all systems in the schedule and blocks until completion.

Default implementation calls Execute() then Wait().

Parameters
scheduleCompiled schedule to execute
worldWorld to pass to each system

Reimplemented in helios::ecs::MainThreadExecutor, helios::ecs::MultiThreadedExecutor, and helios::ecs::SingleThreadedExecutor.

Definition at line 55 of file executor.hpp.

◆ Wait()

virtual void helios::ecs::Executor::Wait ( )
inlinevirtual

Blocks until the most recent Execute() completes.

Does nothing if no execution is pending.

Reimplemented in helios::ecs::MainThreadExecutor, helios::ecs::MultiThreadedExecutor, and helios::ecs::SingleThreadedExecutor.

Definition at line 52 of file executor.hpp.