Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Engine::Scheduler::Startup Class Reference

Startup scheduler that runs systems only once. More...

#include <Startup.hpp>

Inheritance diagram for Engine::Scheduler::Startup:
Engine::Scheduler::AScheduler Engine::Scheduler::IScheduler

Public Member Functions

 Startup (Core &core, const std::function< void()> &callback)
 Constructor for the Startup scheduler.
void RunSystems () override
 Run the systems according to the scheduler policy.
Public Member Functions inherited from Engine::Scheduler::AScheduler
 AScheduler (Core &core)
 Constructor of the AScheduler class.
decltype(auto) GetSystems ()
 Get systems inside the scheduler.
template<typename... TSystems>
decltype(auto) AddSystems (TSystems... systems)
 Add systems to the scheduler.
void Disable (FunctionUtils::FunctionID id)
 Disable a system.
void Enable (FunctionUtils::FunctionID id)
 Enable a system.
void RunSystem (const SystemBase *system, Core &core)
 Execute a system.
bool ShouldRunNextScheduler () const
 Get whether the next scheduler should run or not. This is mainly set by the error policy of the scheduler.
SchedulerErrorPolicy GetErrorPolicy () const override
 Get the error policy of the scheduler.
void SetErrorPolicy (SchedulerErrorPolicy errorPolicy) override
 Set the error policy of the scheduler.
void Remove (FunctionUtils::FunctionID id)
 Remove a system from the scheduler.
Public Member Functions inherited from Engine::Scheduler::IScheduler
virtual ~IScheduler ()=default
 Virtual destructor for IScheduler.

Private Attributes

std::function< void()> _callback
 A callback function that will be called after all systems have been run.

Additional Inherited Members

Protected Attributes inherited from Engine::Scheduler::AScheduler
Core_core
 Reference to the core.

Detailed Description

Startup scheduler that runs systems only once.

Constructor & Destructor Documentation

◆ Startup()

Engine::Scheduler::Startup::Startup ( Core & core,
const std::function< void()> & callback )
inlineexplicit

Constructor for the Startup scheduler.

Parameters
coreA reference to the Core.
callbackA callback function that will be called after all systems have been run.
See also
Engine::Scheduler::Startup::_callback

Member Function Documentation

◆ RunSystems()

void Engine::Scheduler::Startup::RunSystems ( void )
overridevirtual

Run the systems according to the scheduler policy.

Implements Engine::Scheduler::IScheduler.

Member Data Documentation

◆ _callback

std::function<void()> Engine::Scheduler::Startup::_callback
private

A callback function that will be called after all systems have been run.


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