SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
AutoFile Class Reference

The AutoFile class is used to automatically reload files when modified. More...

#include <AutoFile.h>

Inheritance diagram for AutoFile:
SoFile

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AutoFile()

AutoFile::AutoFile ( void )

Constructor.

◆ ~AutoFile()

AutoFile::~AutoFile ( )
protectedvirtual

Destructor.

Member Data Documentation

◆ active

SoSFBool AutoFile::active

Sets whether autoload is active.

◆ delay

SoSFFloat AutoFile::delay

Sets the delay before file is reloaded after a modification is detected.

◆ interval

SoSFFloat AutoFile::interval

Sets how often the idle sensor is triggered.

◆ priority

SoSFInt32 AutoFile::priority

Sets the priority of the idle sensor. It is set to the default priority (100) by default.


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