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

Update scheduler that runs systems every time it is called. More...

#include <Update.hpp>

Inheritance diagram for Engine::Scheduler::Update:
Engine::Scheduler::AScheduler Engine::Scheduler::IScheduler RenderingPipeline::Batching RenderingPipeline::CommandCreation RenderingPipeline::Extraction RenderingPipeline::PipelineCreation RenderingPipeline::PreUpdate RenderingPipeline::Preparation RenderingPipeline::Presentation RenderingPipeline::Submission TestScheduler TestScheduler TestScheduler TestScheduler TestScheduler

Public Member Functions

void RunSystems () override
 Run the systems according to the scheduler policy.
float GetDeltaTime () const
 Get the current delta time.
 AScheduler (Core &core)
 Constructor of the AScheduler class.
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

float _elapsedTime = 0.0f
 The elapsed time since the last call to RunSystems.

Additional Inherited Members

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

Detailed Description

Update scheduler that runs systems every time it is called.

Member Function Documentation

◆ AScheduler()

Constructor of the AScheduler class.

Parameters
coreReference to the core.
See also
Engine::Core

◆ GetDeltaTime()

float Engine::Scheduler::Update::GetDeltaTime ( ) const
inline

Get the current delta time.

Returns
The current delta time
Todo
Put the implementation in the cpp file, (remove inline)

◆ RunSystems()

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

Run the systems according to the scheduler policy.

Implements Engine::Scheduler::IScheduler.

Member Data Documentation

◆ _elapsedTime

float Engine::Scheduler::Update::_elapsedTime = 0.0f
private

The elapsed time since the last call to RunSystems.


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