Abstract base class for sensors dependent on time.
More...
#include <Inventor/sensors/SoTimerQueueSensor.h>
|
| SoTimerQueueSensor () |
| Constructors. The second form takes standard callback function and data.
|
|
| SoTimerQueueSensor (SoSensorCB *func, void *data) |
|
virtual | ~SoTimerQueueSensor () |
| Destructor.
|
|
const SbTime & | getTriggerTime () const |
| Returns the time at which this sensor is scheduled to be triggered.
|
|
virtual void | schedule () |
| Adds this sensor to the timer queue.
|
|
virtual void | unschedule () |
| If this sensor is scheduled, removes it from the timer queue so that it will not be triggered.
|
|
virtual bool | isScheduled () const |
| Returns TRUE if this sensor has been scheduled and is waiting in the timer queue to be triggered.
|
|
| SoSensor () |
| Constructors. The second form takes callback function and data.
|
|
| SoSensor (SoSensorCB *f, void *d) |
|
virtual | ~SoSensor () |
| Virtual destructor so that subclasses are deleted properly.
|
|
void | setFunction (SoSensorCB *f) |
| Sets the callback function that is called when the sensor is triggered.
|
|
void | setData (void *d) |
| Sets the callback data passed to the callback function.
|
|
SoSensorCB * | getFunction () const |
| Returns the callback function that will be called when the sensor is triggered.
|
|
void * | getData () const |
| Returns the user-supplied pointer that will be passed to the callback function.
|
|
virtual void | schedule ()=0 |
| Schedules the sensor for triggering at the appropriate time.
|
|
virtual void | unschedule ()=0 |
| Unschedules sensor to keep it from being triggered.
|
|
virtual bool | isScheduled () const =0 |
| Returns whether the sensor is scheduled.
|
|
virtual void | trigger () |
| Triggers the sensor, calling its callback function.
|
|
virtual bool | isBefore (const SoSensor *s) const =0 |
| This returns TRUE if this sensor should precede sensor s in whichever queue this sensor would be in.
|
|
void | setNextInQueue (SoSensor *next) |
| Sets/returns the next sensor in whichever queue the sensor is in.
|
|
SoSensor * | getNextInQueue () const |
|
|
void | setTriggerTime (const SbTime &time) |
| Used by subclasses to set the time at which the sensor is to be triggered.
|
|
virtual void | trigger () |
| Triggers the sensor, calling its callback function.
|
|
|
static void | initClass () |
| Initialize static members, etc.
|
|
Timer queue sensors are sensors that trigger themselves at specific times. The timer queue is normally processed as part of a programs main loop when the program is not busy doing something else. Note that processing the timer queue is not asynchronous em the program must re-enter its main loop for timers to be triggered. When the timer queue is processed, all timers scheduled to go off at or before the current time are triggered once, in order from earliest to latest.
- See Also
- SoTimerSensor, SoAlarmSensor, SoIdleSensor, SoOneShotSensor, SoDataSensor
Definition at line 85 of file SoTimerQueueSensor.h.
◆ SoTimerQueueSensor() [1/2]
SoTimerQueueSensor::SoTimerQueueSensor |
( |
| ) |
|
◆ SoTimerQueueSensor() [2/2]
SoTimerQueueSensor::SoTimerQueueSensor |
( |
SoSensorCB * |
func, |
|
|
void * |
data |
|
) |
| |
◆ ~SoTimerQueueSensor()
virtual SoTimerQueueSensor::~SoTimerQueueSensor |
( |
| ) |
|
|
virtual |
◆ getTriggerTime()
const SbTime & SoTimerQueueSensor::getTriggerTime |
( |
| ) |
const |
|
inline |
◆ isScheduled()
virtual bool SoTimerQueueSensor::isScheduled |
( |
| ) |
const |
|
virtual |
◆ schedule()
virtual void SoTimerQueueSensor::schedule |
( |
| ) |
|
|
virtual |
◆ setTriggerTime()
void SoTimerQueueSensor::setTriggerTime |
( |
const SbTime & |
time | ) |
|
|
protected |
◆ trigger()
virtual void SoTimerQueueSensor::trigger |
( |
| ) |
|
|
protectedvirtual |
This overrides the method in SoSensor because it has to reset the schedule flag before triggering.
Reimplemented from SoSensor.
◆ unschedule()
virtual void SoTimerQueueSensor::unschedule |
( |
| ) |
|
|
virtual |
◆ scheduled
bool SoTimerQueueSensor::scheduled |
|
protected |
The documentation for this class was generated from the following file:
- C:/jh/mevislab/4.0.2_1/build/MeVis/ThirdParty/Sources/Inventor/include/Inventor/sensors/SoTimerQueueSensor.h