SmallChange
1.0.0
A collection of extensions to Coin3D
|
The AutoFile class is used to automatically reload files when modified. More...
#include <AutoFile.h>
Public Member Functions | |
AutoFile (void) | |
virtual void | doAction (SoAction *action) |
virtual void | search (SoSearchAction *action) |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFBool | active |
SoSFFloat | delay |
SoSFFloat | interval |
SoSFInt32 | priority |
Protected Member Functions | |
virtual | ~AutoFile () |
virtual void | notify (SoNotList *list) |
virtual SbBool | readNamedFile (SoInput *in) |
The AutoFile class is used to automatically reload files when modified.
It works by using a timer sensor that triggers an idle sensor at regular intervals. The idle sensor then checks if the loaded file has been modified, and triggers a new timer sensor that reloads the file after a given delay. A delay is needed to avoid trying to load the file while it is being written by another process.
AutoFile::AutoFile | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor.
SoSFBool AutoFile::active |
Sets whether autoload is active.
SoSFFloat AutoFile::delay |
Sets the delay before file is reloaded after a modification is detected.
SoSFFloat AutoFile::interval |
Sets how often the idle sensor is triggered.
SoSFInt32 AutoFile::priority |
Sets the priority of the idle sensor. It is set to the default priority (100) by default.