Skip to main content

Pass Class

Abstract base class for game loop passes. More...

Declaration

class helios::engine::runtime::gameloop::Pass { ... }

Derived Classes

classTypedPass<StateType>

State-filtered pass that only executes in specific states. More...

Public Destructor Index

~Pass ()=default

Public Member Functions Index

voidupdate (helios::engine::runtime::world::UpdateContext &updateContext)=0

Updates all systems in this pass. More...

voidinit (helios::engine::runtime::world::GameWorld &gameWorld)=0

Initializes all systems in this pass. More...

Phase &addCommitPoint (const CommitPoint commitPoint=CommitPoint::PassEvents)=0

Adds a commit point and returns the owning Phase. More...

CommitPointcommitPoint () const noexcept=0

Returns the configured commit point. More...

boolshouldRun (helios::engine::runtime::world::UpdateContext &updateContext) const noexcept=0

Determines if this pass should execute. More...

template <typename T, typename... Args>
Pass &addSystem (Args &&... args)

Adds a system of type T to this pass. More...

Protected Member Attributes Index

helios::engine::runtime::world::SystemRegistrysystemRegistry_ {}

Registry holding all systems for this pass. More...

Description

Abstract base class for game loop passes.

A Pass represents a logical grouping of systems executed sequentially within a Phase. Concrete implementations (TypedPass) add state-based filtering via shouldRun().

## Key Features

  • **System Registration:** Systems are added via addSystem<T>()
  • **Commit Points:** Control when events/commands are synchronized
  • **State Filtering:** Passes can be skipped based on game state
See Also

TypedPass

See Also

Phase

See Also

System

Definition at line 49 of file Pass.ixx.

Public Destructor

~Pass()

virtual helios::engine::runtime::gameloop::Pass::~Pass ()
virtual default

Definition at line 58 of file Pass.ixx.

Public Member Functions

addCommitPoint()

virtual Phase & helios::engine::runtime::gameloop::Pass::addCommitPoint (const CommitPoint commitPoint=CommitPoint::PassEvents)

Adds a commit point and returns the owning Phase.

Parameters
commitPoint

The synchronization flags.

Returns

Reference to the owning Phase.

Definition at line 81 of file Pass.ixx.

References commitPoint and helios::engine::runtime::gameloop::PassEvents.

addSystem()

template <typename T, typename... Args>
Pass & helios::engine::runtime::gameloop::Pass::addSystem (Args &&... args)
inline

Adds a system of type T to this pass.

Template Parameters
T

The system type to add.

Args

Constructor argument types for the system.

Parameters
args

Arguments forwarded to the system constructor.

Returns

Reference to this Pass for method chaining.

Definition at line 111 of file Pass.ixx.

111 Pass& addSystem(Args&&... args) {
112 systemRegistry_.template add<T>(
113 std::forward<Args>(args)...
114 );
115
116 return *this;
117 }

References addSystem and systemRegistry_.

Referenced by addSystem.

commitPoint()

virtual CommitPoint helios::engine::runtime::gameloop::Pass::commitPoint ()
noexcept

Returns the configured commit point.

Returns

The commit point flags for this pass.

Definition at line 88 of file Pass.ixx.

Referenced by addCommitPoint.

init()

virtual void helios::engine::runtime::gameloop::Pass::init (helios::engine::runtime::world::GameWorld & gameWorld)

Initializes all systems in this pass.

Parameters
gameWorld

Reference to the game world.

Definition at line 72 of file Pass.ixx.

shouldRun()

virtual bool helios::engine::runtime::gameloop::Pass::shouldRun (helios::engine::runtime::world::UpdateContext & updateContext)
noexcept

Determines if this pass should execute.

Parameters
updateContext

The current update context.

Returns

True if the pass should run.

Definition at line 97 of file Pass.ixx.

Reference shouldRun.

Referenced by shouldRun.

update()

virtual void helios::engine::runtime::gameloop::Pass::update (helios::engine::runtime::world::UpdateContext & updateContext)

Updates all systems in this pass.

Parameters
updateContext

The current update context.

Definition at line 65 of file Pass.ixx.

Protected Member Attributes

systemRegistry_

helios::engine::runtime::world::SystemRegistry helios::engine::runtime::gameloop::Pass::systemRegistry_ {}
protected

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.