VPTissue Reference Manual
SimShell::Ws::Util::FileSystemWatcher Class Reference

Utility class for being informed about changes to a file/directory on the filesystem. More...

#include <FileSystemWatcher.h>

Inheritance diagram for SimShell::Ws::Util::FileSystemWatcher:
Inheritance graph
Collaboration diagram for SimShell::Ws::Util::FileSystemWatcher:
Collaboration graph

Public Member Functions

 FileSystemWatcher (const std::string &path, std::function< void()> callback)
 
 FileSystemWatcher (FileSystemWatcher &&other)
 Move constructor.
 
bool IsActive () const
 Get 'active' property, i.e. More...
 
void SetActive (bool a)
 Set 'active' property, i.e. More...
 

Detailed Description

Utility class for being informed about changes to a file/directory on the filesystem.

Main purpose is to translate Qt signals to a single callback function, so it can be used by the Workspace/Project template classes. We can't use Qt signals/slots in templates.

Definition at line 36 of file FileSystemWatcher.h.

Constructor & Destructor Documentation

SimShell::Ws::Util::FileSystemWatcher::FileSystemWatcher ( const std::string &  path,
std::function< void()>  callback 
)
inline
Parameters
pathFilesystem path to watch.
callbackCallback function to call whenever something changes at the given path.

Definition at line 44 of file FileSystemWatcher.h.

References SetActive().

Here is the call graph for this function:

Member Function Documentation

bool SimShell::Ws::Util::FileSystemWatcher::IsActive ( ) const
inline

Get 'active' property, i.e.

whether the callback function is called when something changes at the path. Default for this property is true.

See also
SetActive

Definition at line 72 of file FileSystemWatcher.h.

void SimShell::Ws::Util::FileSystemWatcher::SetActive ( bool  a)
inline

Set 'active' property, i.e.

whether the callback function is called when something changes at the path. Default for this property is true.

See also
GetActive

Definition at line 82 of file FileSystemWatcher.h.

Referenced by FileSystemWatcher().

Here is the caller graph for this function:


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