Loading [MathJax]/extensions/MathMenu.js
Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GameClock::ClockTask< Time, Duration > Struct Template Reference

Template structure provide base for different clock tasks. More...

+ Collaboration diagram for GameClock::ClockTask< Time, Duration >:

Public Member Functions

 ClockTask (ClockCbk cbk, Time delay, Duration period, ClockTaskHndl hndl)
 
bool operator== (const ClockTask &task2) const
 
bool operator> (const ClockTask &task2) const
 

Public Attributes

ClockCbk callback
 
Time m_waketime
 
Duration m_period
 
ClockTaskHndl hndl
 

Detailed Description

template<typename Time, typename Duration>
struct GameClock::ClockTask< Time, Duration >

Template structure provide base for different clock tasks.

Definition at line 112 of file GameClock.hxx.

Constructor & Destructor Documentation

◆ ClockTask()

template<typename Time , typename Duration >
GameClock::ClockTask< Time, Duration >::ClockTask ( ClockCbk  cbk,
Time  delay,
Duration  period,
ClockTaskHndl  hndl 
)
inlineexplicit

Definition at line 119 of file GameClock.hxx.

120  : callback{cbk}, m_waketime{delay}, m_period{period}, hndl{hndl}
121  {
122  }

Member Function Documentation

◆ operator==()

template<typename Time , typename Duration >
bool GameClock::ClockTask< Time, Duration >::operator== ( const ClockTask< Time, Duration > &  task2) const
inline

Definition at line 124 of file GameClock.hxx.

124 { return hndl == task2.hndl; };

◆ operator>()

template<typename Time , typename Duration >
bool GameClock::ClockTask< Time, Duration >::operator> ( const ClockTask< Time, Duration > &  task2) const
inline

Definition at line 125 of file GameClock.hxx.

125 { return m_waketime > task2.m_waketime; }

Member Data Documentation

◆ callback

template<typename Time , typename Duration >
ClockCbk GameClock::ClockTask< Time, Duration >::callback

Definition at line 114 of file GameClock.hxx.

◆ hndl

template<typename Time , typename Duration >
ClockTaskHndl GameClock::ClockTask< Time, Duration >::hndl

Definition at line 117 of file GameClock.hxx.

◆ m_period

template<typename Time , typename Duration >
Duration GameClock::ClockTask< Time, Duration >::m_period

Definition at line 116 of file GameClock.hxx.

◆ m_waketime

template<typename Time , typename Duration >
Time GameClock::ClockTask< Time, Duration >::m_waketime

Definition at line 115 of file GameClock.hxx.


The documentation for this struct was generated from the following file:
GameClock::ClockTask::hndl
ClockTaskHndl hndl
Definition: GameClock.hxx:117
GameClock::ClockTask::callback
ClockCbk callback
Definition: GameClock.hxx:114
GameClock::ClockTask::m_waketime
Time m_waketime
Definition: GameClock.hxx:115
GameClock::ClockTask::m_period
Duration m_period
Definition: GameClock.hxx:116