Sensor that triggers a callback each time a file is changed. More...
#include <Inventor/sensors/SoFileSensor.h>
Inheritance diagram for SoFileSensor:Public Member Functions | |
| SoFileSensor () | |
| Default constructor. | |
| SoFileSensor (SoSensorCB *func, void *data) | |
| Constructor that takes the callback function and data to be called when the sensor is triggered. | |
| virtual | ~SoFileSensor () |
| Destroys the sensor, freeing up any memory associated with it after unscheduling it. | |
| void | addFile (const SbString &filename) |
| Add file to be monitored. | |
| void | removeFile (const SbString &filename) |
| Remove file from monitored list. | |
| void | clearFiles () |
| Stop monitoring all previously registered files. | |
| SbString | getFilename () const |
| Return changed file name. | |
Public Member Functions inherited from SoTimerSensor | |
| SoTimerSensor () | |
| Default constructor. | |
| SoTimerSensor (SoSensorCB *func, void *data) | |
| Constructor that takes the function and data to be called when the sensor is triggered. | |
| virtual | ~SoTimerSensor () |
| Destroys the sensor, freeing up any memory associated with it after unscheduling it. | |
| void | setBaseTime (const SbTime &base) |
| Sets the base time. | |
| void | setInterval (const SbTime &intvl) |
| Sets the interval. | |
| const SbTime & | getBaseTime () const |
| Gets the base time. | |
| const SbTime & | getInterval () const |
| Gets the interval. | |
| 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. | |
Public Member Functions inherited from SoTimerQueueSensor | |
| SoTimerQueueSensor () | |
| Constructor. | |
| SoTimerQueueSensor (SoSensorCB *func, void *data) | |
| Constructor that takes standard callback function and data. | |
| const SbTime & | getTriggerTime () const |
| Returns the time at which this sensor is scheduled to be triggered. | |
Public Member Functions inherited from SoSensor | |
| SoSensor () | |
| Constructor. | |
| SoSensor (SoSensorCB *f, void *d) | |
| Constructor that takes standard callback function and data. | |
| void | setFunction (SoSensorCB *f, void *userData) |
| 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 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 SbBool | isScheduled () const |
| Returns TRUE if this sensor has been scheduled and is waiting in a sensor queue to be triggered. | |
Additional Inherited Members | |
Public Types inherited from SoSensor | |
| typedef void | SoSensorCB(void *data, SoSensor *sensor) |
| This typedef defines the calling sequence for all callbacks from sensors. | |
Sensor that triggers a callback each time a file is changed.
File sensors trigger their callback function when a watched file changes. Files are checked at the interval specified with SoTimerSensor::setInterval.
SoOneShotSensor, SoAlarmSensor, SoTimerQueueSensor, SbTime
Definition at line 50 of file SoFileSensor.h.
| SoFileSensor::SoFileSensor | ( | ) |
Default constructor.
| SoFileSensor::SoFileSensor | ( | SoSensorCB * | func, |
| void * | data ) |
Constructor that takes the callback function and data to be called when the sensor is triggered.
|
virtual |
Destroys the sensor, freeing up any memory associated with it after unscheduling it.
| void SoFileSensor::addFile | ( | const SbString & | filename | ) |
Add file to be monitored.
If file does not exist, the method does nothing.
| void SoFileSensor::clearFiles | ( | ) |
Stop monitoring all previously registered files.
|
inline |
Return changed file name.
Note: Only valid when called from the callback function.
Definition at line 89 of file SoFileSensor.h.
| void SoFileSensor::removeFile | ( | const SbString & | filename | ) |
Remove file from monitored list.
If file is not being monitored, the method does nothing.