SoFileSensor Class Reference
[Sensors]

Sensor that triggers a callback each time a file is changed. More...

#include <Inventor/sensors/SoFileSensor.h>

Inheritance diagram for SoFileSensor:
SoTimerSensor SoTimerQueueSensor SoSensor

List of all members.

Public Member Functions

 SoFileSensor ()
 SoFileSensor (SoSensorCB *func, void *data)
virtual ~SoFileSensor ()
void addFile (const SbString &filename)
void removeFile (const SbString &filename)
void clearFiles ()
SbString getFilename () const

Detailed Description

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.

SEE ALSO

SoOneShotSensor, SoAlarmSensor, SoTimerQueueSensor, SbTime


Constructor & Destructor Documentation

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 SoFileSensor::~SoFileSensor (  )  [virtual]

Destroys the sensor, freeing up any memory associated with it after unscheduling it.


Member Function Documentation

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.

SbString SoFileSensor::getFilename (  )  const [inline]

Return changed file name.


Note: Only valid when called from the callback function.

void SoFileSensor::removeFile ( const SbString filename  ) 

Remove file from monitored list.

If file is not being monitored, the method does nothing.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/