VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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. More...
 
virtual ~DtRecurringTimer ()
 
virtual void fire ()
 Sets off (fires) the timer. More...
 
- 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. More...
 
 DtTimer (const DtTimer &orig)
 copy constructor More...
 
DtTimeroperator= (const DtTimer &orig)
 assignment operator More...
 
virtual ~DtTimer ()
 destructor More...
 
virtual bool tick (const DtTime simTime)
 If time to fire, calls fire and returns true. More...
 
virtual void reset (const DtTime fireTime)
 Resets the time to fire. More...
 
virtual void cancel ()
 Sets cancelled state to true, fired state to false. More...
 
virtual bool fired () const
 Returns whether or not timer has fired. More...
 
virtual DtTime fireTime () const
 Simulation time that timer is scheduled to fire. More...
 
virtual unsigned int timerType () const
 User-specified integer used to identify the purpose of the timer. More...
 
virtual void * usrData ()
 Pointer to user-specified data to be passed into callback when timer fires. More...
 
virtual bool cancelled () const
 Returns whether or not timer has been cancelled (if its cancel() member has been called). More...
 
virtual void setResortPending ()
 Resort pending state is used by a DtScheduler as it manages when it wants to resort the timers it is maintaining. More...
 
virtual void clearResortPending ()
 
virtual bool resortPending () const
 
virtual void setDeleteAfterFire ()
 Designates timer whether or not should be automatically deleted after it has fired. More...
 
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). More...
 
virtual bool managed () const
 Indicates whether or not timer is being managed by a DtScheduler or not. More...
 
virtual void setScheduler (DtScheduler *scheduler)
 Sets the DtScheduler responsible for managing this timer. More...
 

Protected Member Functions

DtRecurringTimeroperator= (const DtRecurringTimer &orig)
 not defined More...
 

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. More...
 
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 Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)