Blender V5.0
GHOST_TimerTask Class Reference

#include <GHOST_TimerTask.hh>

Inherits GHOST_ITimerTask.

Public Member Functions

 GHOST_TimerTask (uint64_t start, uint64_t interval, GHOST_TimerProcPtr timer_proc, GHOST_TUserDataPtr user_data=nullptr)
uint64_t getStart () const
void setStart (uint64_t start)
uint64_t getInterval () const
void setInterval (uint64_t interval)
uint64_t getNext () const
void setNext (uint64_t next)
GHOST_TimerProcPtr getTimerProc () const override
void setTimerProc (const GHOST_TimerProcPtr timer_proc) override
GHOST_TUserDataPtr getUserData () const override
void setUserData (const GHOST_TUserDataPtr user_data) override
uint32_t getAuxData () const
void setAuxData (uint32_t auxData)
Public Member Functions inherited from GHOST_ITimerTask
virtual ~GHOST_ITimerTask ()=default

Protected Attributes

uint64_t start_
uint64_t interval_
uint64_t next_
GHOST_TimerProcPtr timer_proc_
GHOST_TUserDataPtr user_data_
uint32_t aux_data_ = 0

Detailed Description

Implementation of a timer task.

Definition at line 17 of file GHOST_TimerTask.hh.

Constructor & Destructor Documentation

◆ GHOST_TimerTask()

GHOST_TimerTask::GHOST_TimerTask ( uint64_t start,
uint64_t interval,
GHOST_TimerProcPtr timer_proc,
GHOST_TUserDataPtr user_data = nullptr )
inline

Constructor.

Parameters
startThe timer start time.
intervalThe interval between calls to the #timer_proc.
timer_procThe callback invoked when the interval expires.
user_dataThe timer user data.

Definition at line 26 of file GHOST_TimerTask.hh.

References interval_, next_, start_, timer_proc_, and user_data_.

Member Function Documentation

◆ getAuxData()

uint32_t GHOST_TimerTask::getAuxData ( ) const
inline

Returns the auxiliary storage room.

Returns
The auxiliary storage room.

Definition at line 120 of file GHOST_TimerTask.hh.

References aux_data_.

◆ getInterval()

uint64_t GHOST_TimerTask::getInterval ( ) const
inline

Returns the timer interval.

Returns
The timer interval.

Definition at line 60 of file GHOST_TimerTask.hh.

References interval_.

Referenced by GHOST_TimerManager::fireTimer().

◆ getNext()

uint64_t GHOST_TimerTask::getNext ( ) const
inline

Returns the time the timer_proc will be called.

Returns
The time the timer_proc will be called.

Definition at line 78 of file GHOST_TimerTask.hh.

References next_.

Referenced by GHOST_TimerManager::fireTimer().

◆ getStart()

uint64_t GHOST_TimerTask::getStart ( ) const
inline

Returns the timer start time.

Returns
The timer start time.

Definition at line 42 of file GHOST_TimerTask.hh.

References start_.

Referenced by GHOST_TimerManager::fireTimer().

◆ getTimerProc()

GHOST_TimerProcPtr GHOST_TimerTask::getTimerProc ( ) const
inlineoverridevirtual

Returns the timer callback.

Returns
The timer callback.

Implements GHOST_ITimerTask.

Definition at line 93 of file GHOST_TimerTask.hh.

References timer_proc_.

Referenced by GHOST_TimerManager::fireTimer().

◆ getUserData()

GHOST_TUserDataPtr GHOST_TimerTask::getUserData ( ) const
inlineoverridevirtual

Returns the timer user data.

Returns
The timer user data.

Implements GHOST_ITimerTask.

Definition at line 105 of file GHOST_TimerTask.hh.

References user_data_.

◆ setAuxData()

void GHOST_TimerTask::setAuxData ( uint32_t auxData)
inline

Changes the auxiliary storage room.

Parameters
auxDataThe auxiliary storage room.

Definition at line 129 of file GHOST_TimerTask.hh.

References aux_data_.

◆ setInterval()

void GHOST_TimerTask::setInterval ( uint64_t interval)
inline

Changes the timer interval.

Parameters
intervalThe timer interval.

Definition at line 69 of file GHOST_TimerTask.hh.

References interval_.

◆ setNext()

void GHOST_TimerTask::setNext ( uint64_t next)
inline

Changes the time the timer_proc will be called.

Parameters
nextThe time the timer_proc will be called.

Definition at line 87 of file GHOST_TimerTask.hh.

References next, and next_.

Referenced by GHOST_TimerManager::fireTimer().

◆ setStart()

void GHOST_TimerTask::setStart ( uint64_t start)
inline

Changes the timer start time.

Parameters
startThe timer start time.

Definition at line 51 of file GHOST_TimerTask.hh.

References start_.

◆ setTimerProc()

void GHOST_TimerTask::setTimerProc ( const GHOST_TimerProcPtr timer_proc)
inlineoverridevirtual

Changes the timer callback.

Parameters
timer_procThe timer callback.

Implements GHOST_ITimerTask.

Definition at line 99 of file GHOST_TimerTask.hh.

References timer_proc_.

◆ setUserData()

void GHOST_TimerTask::setUserData ( const GHOST_TUserDataPtr user_data)
inlineoverridevirtual

Changes the time user data.

Parameters
user_dataThe timer user data.

Implements GHOST_ITimerTask.

Definition at line 111 of file GHOST_TimerTask.hh.

References user_data_.

Member Data Documentation

◆ aux_data_

uint32_t GHOST_TimerTask::aux_data_ = 0
protected

Auxiliary storage room.

Definition at line 151 of file GHOST_TimerTask.hh.

Referenced by getAuxData(), and setAuxData().

◆ interval_

uint64_t GHOST_TimerTask::interval_
protected

The interval between calls.

Definition at line 139 of file GHOST_TimerTask.hh.

Referenced by getInterval(), GHOST_TimerTask(), and setInterval().

◆ next_

uint64_t GHOST_TimerTask::next_
protected

The time the timer_proc will be called.

Definition at line 142 of file GHOST_TimerTask.hh.

Referenced by getNext(), GHOST_TimerTask(), and setNext().

◆ start_

uint64_t GHOST_TimerTask::start_
protected

The time the timer task was started.

Definition at line 136 of file GHOST_TimerTask.hh.

Referenced by getStart(), GHOST_TimerTask(), and setStart().

◆ timer_proc_

GHOST_TimerProcPtr GHOST_TimerTask::timer_proc_
protected

The callback invoked when the timer expires.

Definition at line 145 of file GHOST_TimerTask.hh.

Referenced by getTimerProc(), GHOST_TimerTask(), and setTimerProc().

◆ user_data_

GHOST_TUserDataPtr GHOST_TimerTask::user_data_
protected

The timer task user data.

Definition at line 148 of file GHOST_TimerTask.hh.

Referenced by getUserData(), GHOST_TimerTask(), and setUserData().


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