VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtRecurringTimer Class Reference

File: recTimer.h. More...

Inheritance diagram for DtRecurringTimer:
Inheritance graph
[legend]

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
DtTimeroperator= (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

DtRecurringTimeroperator= (const DtRecurringTimer &orig)
 not defined

Protected Attributes

const DtTime myRecurTime
const DtClockmyClock
- Protected Attributes inherited from DtTimer
DtSchedulermyScheduler
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

Detailed Description

File: recTimer.h.

Class: DtRecurringTimer

Description: A recurring timer resets itself after firing to fire 'recurTime' seconds after the time at which it fired.

Constructor & Destructor Documentation

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 DtRecurringTimer::~DtRecurringTimer ( )
virtual

Member Function Documentation

DtRecurringTimer& DtRecurringTimer::operator= ( const DtRecurringTimer orig)
protected

not defined

virtual void DtRecurringTimer::fire ( )
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.

Member Data Documentation

const DtTime DtRecurringTimer::myRecurTime
protected
const DtClock* DtRecurringTimer::myClock
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)