Skip to main content

GameTimerBindingComponent Class

Component that tracks the revision of a specific GameTimer. More...

Declaration

class helios::engine::mechanics::timing::components::GameTimerBindingComponent { ... }

Public Constructors Index

GameTimerBindingComponent ()=default
GameTimerBindingComponent (const GameTimerBindingComponent &other)

Copy constructor. More...

GameTimerBindingComponent (GameTimerBindingComponent &&) noexcept=default

Public Operators Index

GameTimerBindingComponent &operator= (const GameTimerBindingComponent &)=default
GameTimerBindingComponent &operator= (GameTimerBindingComponent &&) noexcept=default

Public Member Functions Index

voidsetGameTimerId (const helios::engine::core::data::GameTimerId gameTimerId) noexcept

Sets the id of the game timer to observe. More...

helios::engine::core::data::GameTimerIdgameTimerId () const noexcept

Returns the observed game timer id. More...

voidsetTimerRevision (const TimerRevision timerRevision) noexcept

Sets the last known timer revision. More...

TimerRevisiontimerRevision () const noexcept

Returns the last known timer revision. More...

Private Member Attributes Index

GameTimerIdgameTimerId_

The id of the observed game timer. More...

TimerRevisiontimerRevision_

Last known revision of the observed timer. More...

Description

Component that tracks the revision of a specific GameTimer.

Entities with this component observe a GameTimer identified by its GameTimerId. The stored revision can be compared against the timer's current revision to detect updates.

See Also

GameTimer

See Also

GameTimerUpdateSystem

Definition at line 30 of file GameTimerBindingComponent.ixx.

Public Constructors

GameTimerBindingComponent()

helios::engine::mechanics::timing::components::GameTimerBindingComponent::GameTimerBindingComponent ()
default

GameTimerBindingComponent()

helios::engine::mechanics::timing::components::GameTimerBindingComponent::GameTimerBindingComponent (const GameTimerBindingComponent & other)
inline

Copy constructor.

Parameters
other

The component to copy from.

Definition at line 55 of file GameTimerBindingComponent.ixx.

56 gameTimerId_(other.gameTimerId_) {}

Reference GameTimerBindingComponent.

GameTimerBindingComponent()

helios::engine::mechanics::timing::components::GameTimerBindingComponent::GameTimerBindingComponent (GameTimerBindingComponent &&)
noexcept default

Definition at line 59 of file GameTimerBindingComponent.ixx.

Reference GameTimerBindingComponent.

Public Operators

operator=()

GameTimerBindingComponent & helios::engine::mechanics::timing::components::GameTimerBindingComponent::operator= (const GameTimerBindingComponent &)
default

Definition at line 58 of file GameTimerBindingComponent.ixx.

Reference GameTimerBindingComponent.

operator=()

GameTimerBindingComponent & helios::engine::mechanics::timing::components::GameTimerBindingComponent::operator= (GameTimerBindingComponent &&)
noexcept default

Definition at line 60 of file GameTimerBindingComponent.ixx.

Reference GameTimerBindingComponent.

Public Member Functions

gameTimerId()

helios::engine::core::data::GameTimerId helios::engine::mechanics::timing::components::GameTimerBindingComponent::gameTimerId ()
inline nodiscard noexcept

Returns the observed game timer id.

Returns

The GameTimerId.

Definition at line 76 of file GameTimerBindingComponent.ixx.

76 [[nodiscard]] helios::engine::core::data::GameTimerId gameTimerId() const noexcept {
77 return gameTimerId_;
78 }

Referenced by setGameTimerId.

setGameTimerId()

void helios::engine::mechanics::timing::components::GameTimerBindingComponent::setGameTimerId (const helios::engine::core::data::GameTimerId gameTimerId)
inline noexcept

Sets the id of the game timer to observe.

Parameters
gameTimerId

The timer id.

Definition at line 67 of file GameTimerBindingComponent.ixx.

68 gameTimerId_ = gameTimerId;
69 }

References gameTimerId and setGameTimerId.

Referenced by setGameTimerId.

setTimerRevision()

void helios::engine::mechanics::timing::components::GameTimerBindingComponent::setTimerRevision (const TimerRevision timerRevision)
inline noexcept

Sets the last known timer revision.

If the new revision differs from the stored one, the update flag is set so that consuming systems can detect the change.

Parameters
timerRevision

The revision value.

Definition at line 88 of file GameTimerBindingComponent.ixx.

89 if (timerRevision_ == timerRevision) {
90 return;
91 }
92 timerRevision_ = timerRevision;
93 }

Reference timerRevision.

timerRevision()

TimerRevision helios::engine::mechanics::timing::components::GameTimerBindingComponent::timerRevision ()
inline nodiscard noexcept

Returns the last known timer revision.

Returns

The stored TimerRevision.

Definition at line 100 of file GameTimerBindingComponent.ixx.

100 [[nodiscard]] TimerRevision timerRevision() const noexcept {
101 return timerRevision_;
102 }

Referenced by setTimerRevision.

Private Member Attributes

gameTimerId_

GameTimerId helios::engine::mechanics::timing::components::GameTimerBindingComponent::gameTimerId_

The id of the observed game timer.

Definition at line 37 of file GameTimerBindingComponent.ixx.

37 GameTimerId gameTimerId_;

timerRevision_

TimerRevision helios::engine::mechanics::timing::components::GameTimerBindingComponent::timerRevision_

Last known revision of the observed timer.

Definition at line 42 of file GameTimerBindingComponent.ixx.

42 TimerRevision timerRevision_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.