ScummVM
Kyra::TimerManager Class Reference

#include <timer.h>

Collaboration diagram for Kyra::TimerManager:

Public Member Functions

 TimerManager (KyraEngine_v1 *vm, OSystem *sys)
 
 ~TimerManager ()
 
void pause (bool p)
 
void reset ()
 
void addTimer (uint8 id, TimerFunc *func, int countdown, bool enabled)
 
int count () const
 
void update ()
 
void resetNextRun ()
 
void setCountdown (uint8 id, int32 countdown)
 
void setDelay (uint8 id, int32 countdown)
 
int32 getDelay (uint8 id) const
 
void setNextRun (uint8 id, uint32 nextRun)
 
uint32 getNextRun (uint8 id) const
 
void pauseSingleTimer (uint8 id, bool p)
 
bool isEnabled (uint8 id) const
 
void enable (uint8 id)
 
void disable (uint8 id)
 
void loadDataFromFile (Common::SeekableReadStream &file, int version)
 
void saveDataToFile (Common::WriteStream &file) const
 

Private Types

typedef Common::List< TimerEntry >::iterator Iterator
 
typedef Common::List< TimerEntry >::const_iterator CIterator
 

Private Member Functions

void resync ()
 

Private Attributes

KyraEngine_v1_vm
 
OSystem_system
 
Common::List< TimerEntry_timers
 
uint32 _nextRun
 
uint _isPaused
 
uint32 _pauseStart
 

Detailed Description

Definition at line 49 of file timer.h.

Member Typedef Documentation

◆ CIterator

typedef Common::List<TimerEntry>::const_iterator Kyra::TimerManager::CIterator
private

Definition at line 93 of file timer.h.

◆ Iterator

Definition at line 92 of file timer.h.

Constructor & Destructor Documentation

◆ TimerManager()

Kyra::TimerManager::TimerManager ( KyraEngine_v1 vm,
OSystem sys 
)
inline

Definition at line 51 of file timer.h.

◆ ~TimerManager()

Kyra::TimerManager::~TimerManager ( )
inline

Definition at line 52 of file timer.h.

Member Function Documentation

◆ addTimer()

void Kyra::TimerManager::addTimer ( uint8  id,
TimerFunc func,
int  countdown,
bool  enabled 
)

Definition at line 90 of file timer.cpp.

◆ count()

int Kyra::TimerManager::count ( ) const
inline

Definition at line 60 of file timer.h.

◆ disable()

void Kyra::TimerManager::disable ( uint8  id)

Definition at line 238 of file timer.cpp.

◆ enable()

void Kyra::TimerManager::enable ( uint8  id)

Definition at line 230 of file timer.cpp.

◆ getDelay()

int32 Kyra::TimerManager::getDelay ( uint8  id) const

Definition at line 170 of file timer.cpp.

◆ getNextRun()

uint32 Kyra::TimerManager::getNextRun ( uint8  id) const

Definition at line 191 of file timer.cpp.

◆ isEnabled()

bool Kyra::TimerManager::isEnabled ( uint8  id) const

Definition at line 221 of file timer.cpp.

◆ loadDataFromFile()

void Kyra::TimerManager::loadDataFromFile ( Common::SeekableReadStream file,
int  version 
)

Definition at line 246 of file timer.cpp.

◆ pause()

void Kyra::TimerManager::pause ( bool  p)

Definition at line 60 of file timer.cpp.

◆ pauseSingleTimer()

void Kyra::TimerManager::pauseSingleTimer ( uint8  id,
bool  p 
)

Definition at line 200 of file timer.cpp.

◆ reset()

void Kyra::TimerManager::reset ( )

Definition at line 83 of file timer.cpp.

◆ resetNextRun()

void Kyra::TimerManager::resetNextRun ( )

Definition at line 139 of file timer.cpp.

◆ resync()

void Kyra::TimerManager::resync ( )
private

Definition at line 132 of file timer.cpp.

◆ saveDataToFile()

void Kyra::TimerManager::saveDataToFile ( Common::WriteStream file) const

Definition at line 292 of file timer.cpp.

◆ setCountdown()

void Kyra::TimerManager::setCountdown ( uint8  id,
int32  countdown 
)

Definition at line 143 of file timer.cpp.

◆ setDelay()

void Kyra::TimerManager::setDelay ( uint8  id,
int32  countdown 
)

Definition at line 162 of file timer.cpp.

◆ setNextRun()

void Kyra::TimerManager::setNextRun ( uint8  id,
uint32  nextRun 
)

Definition at line 179 of file timer.cpp.

◆ update()

void Kyra::TimerManager::update ( )

Definition at line 109 of file timer.cpp.

Member Data Documentation

◆ _isPaused

uint Kyra::TimerManager::_isPaused
private

Definition at line 89 of file timer.h.

◆ _nextRun

uint32 Kyra::TimerManager::_nextRun
private

Definition at line 87 of file timer.h.

◆ _pauseStart

uint32 Kyra::TimerManager::_pauseStart
private

Definition at line 90 of file timer.h.

◆ _system

OSystem* Kyra::TimerManager::_system
private

Definition at line 85 of file timer.h.

◆ _timers

Common::List<TimerEntry> Kyra::TimerManager::_timers
private

Definition at line 86 of file timer.h.

◆ _vm

KyraEngine_v1* Kyra::TimerManager::_vm
private

Definition at line 84 of file timer.h.


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