#include <TimeableObject.h>
Inheritance diagram for random_utils::TimeableObject:

Public Member Functions | |
| TimeableObject () | |
| Ctor. | |
| virtual | ~TimeableObject () |
| Dtor. | |
Protected Member Functions | |
| void | startTimer (unsigned int milliseconds) |
| Starts a new timer which will probably call timerTick() in milliseconds milliseconds. | |
| void | stopTimer () |
| Stops the timer, there will be no callback next time. | |
| void | changeTimer (unsigned int milliseconds) |
| Changes the timer interval to milliseconds milliseconds. | |
| virtual void | timerTick ()=0 |
| You have to implement this pure-virtual method if you derive from TimeableObject so you can recieve timer events. | |
Private Types | |
| enum | { INITIALIZED, RUNNING, SHUTDOWN } |
| Holds the current state of the object. More... | |
Private Member Functions | |
| void | internalTimerTick () |
| This method wrapps timerTick(), and does the other internal stuff to setup the timers, etc. | |
| void | restartTimer () |
| Also used internally to start the timer again. | |
Static Private Member Functions | |
| static void | wrapperFunction (int self) |
| This is the function we register at GLUT which then calls internalTimerTick(). | |
Private Attributes | |
| unsigned int | m_currentDelay |
| The current timer delay, used in restartTimer(). | |
| enum random_utils::TimeableObject:: { ... } | m_state |
| Holds the current state of the object. | |
Definition at line 11 of file TimeableObject.h.
anonymous enum [private] |
| random_utils::TimeableObject::TimeableObject | ( | ) |
| random_utils::TimeableObject::~TimeableObject | ( | ) | [virtual] |
| void random_utils::TimeableObject::wrapperFunction | ( | int | self | ) | [static, private] |
This is the function we register at GLUT which then calls internalTimerTick().
Definition at line 24 of file TimeableObject.cpp.
Referenced by restartTimer().
Here is the caller graph for this function:

| void random_utils::TimeableObject::internalTimerTick | ( | ) | [private] |
This method wrapps timerTick(), and does the other internal stuff to setup the timers, etc.
Definition at line 30 of file TimeableObject.cpp.
References INITIALIZED, m_state, restartTimer(), RUNNING, SHUTDOWN, and timerTick().
Here is the call graph for this function:

| void random_utils::TimeableObject::restartTimer | ( | ) | [private] |
Also used internally to start the timer again.
Definition at line 81 of file TimeableObject.cpp.
References m_currentDelay, and wrapperFunction().
Referenced by internalTimerTick(), and startTimer().
Here is the call graph for this function:

Here is the caller graph for this function:

| void random_utils::TimeableObject::startTimer | ( | unsigned int | milliseconds | ) | [protected] |
Starts a new timer which will probably call timerTick() in milliseconds milliseconds.
Definition at line 48 of file TimeableObject.cpp.
References m_currentDelay, m_state, restartTimer(), RUNNING, and SHUTDOWN.
Referenced by random_racer::ThirdPersonCameraHelper::setDelay(), random_racer::CenterScreenDisplay::showText(), random_racer::Presenter::startAnimation(), random_racer::Console::startAnimation(), and random_racer::CenterScreenDisplay::timerTick().
Here is the call graph for this function:

Here is the caller graph for this function:

| void random_utils::TimeableObject::stopTimer | ( | ) | [protected] |
Stops the timer, there will be no callback next time.
Definition at line 68 of file TimeableObject.cpp.
References m_state, RUNNING, and SHUTDOWN.
Referenced by random_racer::Presenter::timerTick(), random_racer::Console::timerTick(), and random_racer::CenterScreenDisplay::timerTick().
Here is the caller graph for this function:

| void random_utils::TimeableObject::changeTimer | ( | unsigned int | milliseconds | ) | [protected] |
Changes the timer interval to milliseconds milliseconds.
Definition at line 75 of file TimeableObject.cpp.
References m_currentDelay.
| virtual void random_utils::TimeableObject::timerTick | ( | ) | [protected, pure virtual] |
You have to implement this pure-virtual method if you derive from TimeableObject so you can recieve timer events.
Implemented in random_racer::CenterScreenDisplay, random_racer::Console, random_racer::Presenter, and random_racer::ThirdPersonCameraHelper.
Referenced by internalTimerTick().
Here is the caller graph for this function:

unsigned int random_utils::TimeableObject::m_currentDelay [private] |
The current timer delay, used in restartTimer().
Definition at line 16 of file TimeableObject.h.
Referenced by changeTimer(), restartTimer(), and startTimer().
enum { ... } random_utils::TimeableObject::m_state [private] |
Holds the current state of the object.
Referenced by internalTimerTick(), startTimer(), stopTimer(), TimeableObject(), and ~TimeableObject().
1.5.1