Inviwo  0.9.10.1
Inviwo documentation
inviwo::FileObserver Class Referenceabstract

#include <fileobserver.h>

+ Inheritance diagram for inviwo::FileObserver:

Public Member Functions

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

Protected Attributes

InviwoApplicationapp_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FileObserver() [1/3]

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

◆ FileObserver() [2/3]

inviwo::FileObserver::FileObserver ( const std::string &  filePath = "")

Starts observing file if existing.

Note
Registers as a file observer in InviwoApplication.
Parameters
filePathFull path to file to observe

◆ FileObserver() [3/3]

inviwo::FileObserver::FileObserver ( FileObserver &&  rhs)

Moves observed files from other

◆ ~FileObserver()

inviwo::FileObserver::~FileObserver ( )
virtual

Unregisters file observer in InviwoApplication and stops observing all files.

Member Function Documentation

◆ startFileObservation()

bool inviwo::FileObserver::startFileObservation ( const std::string &  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::string &  filePath)

Stops observing the file if being observed.

Parameters
filePathFull path to file

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