![]() |
VR-Forces 4.6.1 Class Documentation
|
File: recTimer.h. More...

Public Member Functions | |
| DtRecurringTimer (const DtClock *clock, const unsigned int type, const DtTime recurTime, const DtTimerCallbackFcn callback, void *usr) | |
| The usr pointer points to some user-specified data that will be passed in to the given callback when the timer fires. | |
| virtual | ~DtRecurringTimer () |
| virtual void | fire () |
| Sets off (fires) the timer. | |
Public Member Functions inherited from DtTimer | |
| DtTimer (const unsigned int type, const DtTime fireTime, const DtTimerCallbackFcn callback, void *usr) | |
| constructor The type parameter is an integer assigned by the caller for debugging purposes. | |
| DtTimer (const DtTimer &orig) | |
| copy constructor | |
| DtTimer & | operator= (const DtTimer &orig) |
| assignment operator | |
| virtual | ~DtTimer () |
| destructor | |
| virtual bool | tick (const DtTime simTime) |
| If time to fire, calls fire and returns true. | |
| virtual void | reset (const DtTime fireTime) |
| Resets the time to fire. | |
| virtual void | cancel () |
| Sets cancelled state to true, fired state to false. | |
| virtual bool | fired () const |
| Returns whether or not timer has fired. | |
| virtual DtTime | fireTime () const |
| Simulation time that timer is scheduled to fire. | |
| virtual unsigned int | timerType () const |
| User-specified integer used to identify the purpose of the timer. | |
| virtual void * | usrData () |
| Pointer to user-specified data to be passed into callback when timer fires. | |
| virtual bool | cancelled () const |
| Returns whether or not timer has been cancelled (if its cancel() member has been called). | |
| virtual void | setResortPending () |
| Resort pending state is used by a DtScheduler as it manages when it wants to resort the timers it is maintaining. | |
| virtual void | clearResortPending () |
| virtual bool | resortPending () const |
| virtual void | setDeleteAfterFire () |
| Designates timer whether or not should be automatically deleted after it has fired. | |
| virtual void | clearDeleteAfterFire () |
| virtual bool | deleteAfterFire () const |
| Indicates if timer has been configured to be automatically deleted upon firing or not (in which case creator of timer is responsible for deleting timer after it has fired). | |
| virtual bool | managed () const |
| Indicates whether or not timer is being managed by a DtScheduler or not. | |
| virtual void | setScheduler (DtScheduler *scheduler) |
| Sets the DtScheduler responsible for managing this timer. | |
Protected Member Functions | |
| DtRecurringTimer & | operator= (const DtRecurringTimer &orig) |
| not defined | |
Protected Attributes | |
| const DtTime | myRecurTime |
| const DtClock * | myClock |
Protected Attributes inherited from DtTimer | |
| DtScheduler * | myScheduler |
| const DtTimerCallbackFcn | myCallback |
| const unsigned int | myType |
| void * | myUsrData |
| This pointer is the property of the DtTimer user and should not be modified in any way by DtTimer. | |
| bool | myFired |
| bool | myDeleteAfterFire |
| bool | myCancelled |
| DtTime | myFireTime |
| bool | myResortPending |
File: recTimer.h.
Class: DtRecurringTimer
Description: A recurring timer resets itself after firing to fire 'recurTime' seconds after the time at which it fired.
| DtRecurringTimer::DtRecurringTimer | ( | const DtClock * | clock, |
| const unsigned int | type, | ||
| const DtTime | recurTime, | ||
| const DtTimerCallbackFcn | callback, | ||
| void * | usr | ||
| ) |
The usr pointer points to some user-specified data that will be passed in to the given callback when the timer fires.
The usr pointer is owned by the caller (who is therefore responsible for destroying it) and it should not be modified by this class in any way.
|
virtual |
|
protected |
not defined
|
virtual |
Sets off (fires) the timer.
Sets the fired state to true. If a callback exists, invokes the callback. If myScheduler has been set, calls scheduler's reSort() member passing in this object as the argument.
Reimplemented from DtTimer.
|
protected |
|
protected |