VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
timer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: timer.h,v $ $Revision: 1.8 $ $State: Exp $
7 *******************************************************************************/
8 
11 
21 
22 #ifndef DtTimer_H_
23 #define DtTimer_H_
24 
25 #include <vrfutil/simClock.h>
26 #include <vlutil/vlList.h>
27 
28 class DtScheduler;
29 class DtTimer;
30 
31 typedef void (*DtTimerCallbackFcn)(DtTimer *timer);
32 
44 #include "vrfcore/vrfcoreDefines.h"
46 {
47 
48 public:
49 
59  DtTimer(const unsigned int type, const DtTime fireTime,
60  const DtTimerCallbackFcn callback, void *usr);
61 
63  DtTimer(const DtTimer & orig);
64 
66  DtTimer & operator=(const DtTimer & orig);
67 
69  virtual ~DtTimer();
70 
72  virtual bool tick(const DtTime simTime);
73 
77  virtual void reset(const DtTime fireTime);
78 
82  virtual void cancel();
83 
87  virtual void fire();
88 
90  virtual bool fired() const;
91 
93  virtual DtTime fireTime() const;
94 
98  virtual unsigned int timerType() const;
99 
101  virtual void * usrData();
102 
105  virtual bool cancelled() const;
106 
109  virtual void setResortPending();
110  virtual void clearResortPending();
111  virtual bool resortPending() const;
112 
119  virtual void setDeleteAfterFire();
120  virtual void clearDeleteAfterFire();
121 
127  virtual bool deleteAfterFire() const;
128 
131  virtual bool managed() const;
132 
134  virtual void setScheduler(DtScheduler * scheduler);
135 
136 protected:
137 
140  const unsigned int myType;
143  void * myUsrData;
144  bool myFired;
149 };
150 
151 #endif
152 
153 
class DtScheduler
Definition: scheduler.h:23
DtScheduler * myScheduler
Definition: timer.h:138
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:45
const DtTimerCallbackFcn myCallback
Definition: timer.h:139
DtTime myFireTime
Definition: timer.h:147
bool myDeleteAfterFire
Definition: timer.h:145
File: vlClock.h.
bool myResortPending
Definition: timer.h:148
void * myUsrData
This pointer is the property of the DtTimer user and should not be modified in any way by DtTimer...
Definition: timer.h:143
const unsigned int myType
Definition: timer.h:140
bool myFired
Definition: timer.h:144
void(* DtTimerCallbackFcn)(DtTimer *timer)
Definition: timer.h:31
bool myCancelled
Definition: timer.h:146
#define DT_DLL_vrfcore
This file is used to determine how to build.
Definition: vrfcoreDefines.h:25

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)