Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::FileObserver Class Referenceabstract

#include <fileobserver.h>

+ Inheritance diagram for inviwo::FileObserver:

Public Member Functions

 FileObserver (InviwoApplication *app)
 
 FileObserver (FileSystemObserver *app)
 
 FileObserver (const FileObserver &)=delete
 
FileObserveroperator= (const FileObserver &)=delete
 
 FileObserver (FileObserver &&rhs)
 
FileObserveroperator= (FileObserver &&that)
 
virtual ~FileObserver ()
 
bool startFileObservation (const std::filesystem::path &filePath)
 Starts observing file if it exists.
 
bool stopFileObservation (const std::filesystem::path &filePath)
 Stops observing the file if being observed.
 
void stopAllObservation ()
 
const std::unordered_set< std::filesystem::path, PathHash > & getFiles () const
 
bool isObserved (const std::filesystem::path &fileName) const
 
virtual void fileChanged (const std::filesystem::path &fileName)=0
 

Protected Attributes

FileSystemObserverfileSystemObserver_
 

Detailed Description

Calls fileChanged when an observed file/directory changes. One or multiple files/directories can be observed.

Constructor & Destructor Documentation

◆ FileObserver() [1/2]

inviwo::FileObserver::FileObserver ( InviwoApplication * app)
Note
Registers as a file observer in InviwoApplication.

◆ FileObserver() [2/2]

inviwo::FileObserver::FileObserver ( FileSystemObserver * app)
Note
Registers as a file observer in FileSystemObserver.

◆ ~FileObserver()

virtual inviwo::FileObserver::~FileObserver ( )
virtual

Unregisters file observer in InviwoApplication and stops observing all files.

Member Function Documentation

◆ startFileObservation()

bool inviwo::FileObserver::startFileObservation ( const std::filesystem::path & filePath)

Starts observing file if it exists.

Parameters
filePathFull path to file

◆ stopAllObservation()

void inviwo::FileObserver::stopAllObservation ( )

Stop observation of all observed files

◆ stopFileObservation()

bool inviwo::FileObserver::stopFileObservation ( const std::filesystem::path & filePath)

Stops observing the file if being observed.

Parameters
filePathFull path to file

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