SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::helper::system::FileEventListener Class Referenceabstract

#include <FileMonitor.h>

Contains an event-based API to monitor file changes. More...

Inheritance diagram for sofa::helper::system::FileEventListener:

Detailed Description

Contains an event-based API to monitor file changes.

Those functions are here only to avoid depending on an external library, and they provide only basic functionality.

This set of functions is not meant to be complete, but it can be completed if need be.

Example of use: 1) implement the FileEventListener interface 2) register the files you want to monitor using FileMonitor::addFile("mypath/to/file", &mylistener); 3) call the update function to process & trigger the events.

The system does not contains any hidden thread. If you request the monitoring to happens in an hidden thread you can implement it externally.

Public Member Functions

virtual ~FileEventListener ()
 
virtual void fileHasChanged (const std::string &filename)=0
 

Constructor details

virtual sofa::helper::system::FileEventListener::~FileEventListener ( )
inlinevirtual

Function details

virtual void sofa::helper::system::FileEventListener::fileHasChanged ( const std::string &  filename)
pure virtual