random_utils/include/random_utils/TimeableObject.h

Go to the documentation of this file.
00001 #ifndef _RU_TIMEABLEOBJECT_H_
00002 #define _RU_TIMEABLEOBJECT_H_
00003 
00004 namespace random_utils
00005 {
00006 
00011 class TimeableObject
00012 {
00016     unsigned int m_currentDelay;
00017 
00021     enum {INITIALIZED, RUNNING, SHUTDOWN} m_state;
00022 
00023 
00028     static void wrapperFunction(int self);
00029 
00034     void internalTimerTick();
00035 
00039     void restartTimer();
00040 
00041 protected:
00046     void startTimer(unsigned int milliseconds);
00047 
00051     void stopTimer();
00052 
00056     void changeTimer(unsigned int milliseconds);
00057 
00062     virtual void timerTick() = 0;
00063 
00064 public:
00068     TimeableObject();
00069 
00073     virtual ~TimeableObject();
00074 };
00075 
00076 } // namespace random_utils
00077 
00078 #endif // _RU_TIMEABLEOBJECT_H_

Generated on Fri May 11 21:01:58 2007 for Random Racer by  doxygen 1.5.1