Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::SysSupport::Timer Class Reference

Wrapper for SDL thread which runs timer. More...

#include <Timer.h>

Inheritance diagram for Teddy::SysSupport::Timer:

Inheritance graph
[legend]
Collaboration diagram for Teddy::SysSupport::Timer:

Collaboration graph
[legend]
List of all members.

Public Methods

 Timer (Uint32 frequency)
 Constructor. More...

virtual void run ()
virtual void stop ()
virtual void tick ()
 Default tick() implementation. More...

Uint32 getFrequency ()
void setFrequency (Uint32 frequency)
void start ()

Static Public Methods

int sdl_thread_function (void *data)
 This is the timer update function implementation. More...


Protected Attributes

SDL_Thread * sdl_thread
Uint32 sync
Uint32 frequency
bool running

Detailed Description

Wrapper for SDL thread which runs timer.

Definition at line 38 of file Timer.h.


Constructor & Destructor Documentation

Teddy::SysSupport::Timer::Timer Uint32    frequency
 

Constructor.

Definition at line 34 of file Timer.cpp.

References frequency, running, and sdl_thread.

Referenced by sdl_thread_function.


Member Function Documentation

Uint32 Teddy::SysSupport::Timer::getFrequency  
 

Definition at line 41 of file Timer.cpp.

References frequency.

void Teddy::SysSupport::Timer::run   [virtual]
 

Definition at line 62 of file Timer.cpp.

References frequency, running, sync, and tick.

int Teddy::SysSupport::Timer::sdl_thread_function void *    data [static]
 

This is the timer update function implementation.

Definition at line 84 of file Timer.cpp.

References Timer.

void Teddy::SysSupport::Timer::setFrequency Uint32    frequency
 

Definition at line 46 of file Timer.cpp.

References frequency.

void Teddy::SysSupport::Timer::start  
 

Definition at line 51 of file Timer.cpp.

References running, and sync.

void Teddy::SysSupport::Timer::stop   [virtual]
 

Definition at line 57 of file Timer.cpp.

References running.

void Teddy::SysSupport::Timer::tick   [virtual]
 

Default tick() implementation.

Reimplemented from Teddy::MixIn::Tick.

Reimplemented in Teddy::Application::BaseSimulationTimer.

Definition at line 79 of file Timer.cpp.

Referenced by run.


Member Data Documentation

Uint32 Teddy::SysSupport::Timer::frequency [protected]
 

Definition at line 59 of file Timer.h.

Referenced by getFrequency, run, setFrequency, and Timer.

bool Teddy::SysSupport::Timer::running [protected]
 

Definition at line 60 of file Timer.h.

Referenced by run, start, stop, and Timer.

SDL_Thread* Teddy::SysSupport::Timer::sdl_thread [protected]
 

Definition at line 57 of file Timer.h.

Referenced by Timer.

Uint32 Teddy::SysSupport::Timer::sync [protected]
 

Definition at line 58 of file Timer.h.

Referenced by run, and start.


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