Skip to main content

TimerBindingComponent Class Template

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

Declaration

template <typename THandle> class helios::engine::runtime::timing::components::TimerBindingComponent<THandle> { ... }

Public Constructors Index

template <typename THandle>
TimerBindingComponent ()=default
template <typename THandle>
TimerBindingComponent (const TimerBindingComponent &other)

Copy constructor. More...

template <typename THandle>
TimerBindingComponent (TimerBindingComponent &&) noexcept=default

Public Operators Index

template <typename THandle>
TimerBindingComponent &operator= (const TimerBindingComponent &)=default
template <typename THandle>
TimerBindingComponent &operator= (TimerBindingComponent &&) noexcept=default

Public Member Functions Index

template <typename THandle>
voidsetTimerId (const helios::engine::runtime::timing::types::TimerId timerId) noexcept

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

template <typename THandle>
helios::engine::runtime::timing::types::TimerIdtimerId () const noexcept

Returns the observed game timer id. More...

template <typename THandle>
voidsetTimerRevision (const TimerRevision timerRevision) noexcept

Sets the last known timer revision. More...

template <typename THandle>
TimerRevisiontimerRevision () const noexcept

Returns the last known timer revision. More...

Private Member Attributes Index

template <typename THandle>
TimerIdtimerId_

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

template <typename THandle>
TimerRevisiontimerRevision_

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

Description

Component that tracks the revision of a specific Timer.

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

See Also

Timer

See Also

TimerUpdateSystem

Definition at line 30 of file TimerBindingComponent.ixx.

Public Constructors

TimerBindingComponent()

template <typename THandle>
helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::TimerBindingComponent ()
default

Definition at line 48 of file TimerBindingComponent.ixx.

TimerBindingComponent()

template <typename THandle>
helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::TimerBindingComponent (const TimerBindingComponent & other)
inline

Copy constructor.

Parameters
other

The component to copy from.

Definition at line 55 of file TimerBindingComponent.ixx.

56 timerId_(other.timerId_) {}

TimerBindingComponent()

template <typename THandle>
helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::TimerBindingComponent (TimerBindingComponent &&)
noexcept default

Definition at line 59 of file TimerBindingComponent.ixx.

Public Operators

operator=()

template <typename THandle>
TimerBindingComponent & helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::operator= (const TimerBindingComponent &)
default

Definition at line 58 of file TimerBindingComponent.ixx.

operator=()

template <typename THandle>
TimerBindingComponent & helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::operator= (TimerBindingComponent &&)
noexcept default

Definition at line 60 of file TimerBindingComponent.ixx.

Public Member Functions

setTimerId()

template <typename THandle>
void helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::setTimerId (const helios::engine::runtime::timing::types::TimerId timerId)
inline noexcept

Sets the id of the game timer to observe.

Parameters
timerId

The timer id.

Definition at line 67 of file TimerBindingComponent.ixx.

67 void setTimerId(const helios::engine::runtime::timing::types::TimerId timerId) noexcept {
68 timerId_ = timerId;
69 }

Reference helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerId.

setTimerRevision()

template <typename THandle>
void helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::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 TimerBindingComponent.ixx.

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

Reference helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerRevision.

timerId()

template <typename THandle>
helios::engine::runtime::timing::types::TimerId helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerId ()
inline noexcept

Returns the observed game timer id.

Returns

The TimerId.

Definition at line 76 of file TimerBindingComponent.ixx.

Referenced by helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::setTimerId.

timerRevision()

template <typename THandle>
TimerRevision helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerRevision ()
inline noexcept

Returns the last known timer revision.

Returns

The stored TimerRevision.

Definition at line 100 of file TimerBindingComponent.ixx.

101 return timerRevision_;
102 }

Referenced by helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::setTimerRevision.

Private Member Attributes

timerId_

template <typename THandle>
TimerId helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerId_

The id of the observed game timer.

Definition at line 37 of file TimerBindingComponent.ixx.

37 TimerId timerId_;

timerRevision_

template <typename THandle>
TimerRevision helios::engine::runtime::timing::components::TimerBindingComponent< THandle >::timerRevision_

Last known revision of the observed timer.

Definition at line 42 of file TimerBindingComponent.ixx.

42 TimerRevision timerRevision_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.