Open Inventor Reference
|
Abstract base class for sensors dependent on time. More...
#include <Inventor/sensors/SoTimerQueueSensor.h>
Public Member Functions | |
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 SbBool | isScheduled () const |
Returns TRUE if this sensor has been scheduled and is waiting in the timer queue to be triggered. | |
Protected Member Functions | |
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. | |
Protected Attributes | |
SbBool | scheduled |
Whether sensor is scheduled. |
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.
Definition at line 85 of file SoTimerQueueSensor.h.
SoTimerQueueSensor::SoTimerQueueSensor | ( | ) |
SoTimerQueueSensor::SoTimerQueueSensor | ( | SoSensorCB * | func, |
void * | data | ||
) |
virtual SoTimerQueueSensor::~SoTimerQueueSensor | ( | ) | [virtual] |
const SbTime& SoTimerQueueSensor::getTriggerTime | ( | ) | const [inline] |
If the sensor is not scheduled the results are undefined.
Definition at line 97 of file SoTimerQueueSensor.h.
virtual void SoTimerQueueSensor::schedule | ( | ) | [virtual] |
Subclasses provide methods for setting when the sensor will be triggered.
Implements SoSensor.
Reimplemented in SoAlarmSensor, and SoTimerSensor.
void SoTimerQueueSensor::setTriggerTime | ( | const SbTime & | time | ) | [protected] |
virtual void SoTimerQueueSensor::trigger | ( | ) | [protected, virtual] |
virtual void SoTimerQueueSensor::unschedule | ( | ) | [virtual] |
Implements SoSensor.
Reimplemented in SoTimerSensor.
SbBool SoTimerQueueSensor::scheduled [protected] |
Definition at line 119 of file SoTimerQueueSensor.h.