k3d::ifile_change_notifier Class Reference

Interface implemented by objects that can signal changes to files. More...

#include <ifile_change_notifier.h>

Inheritance diagram for k3d::ifile_change_notifier:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ifile_change_notifier ()
virtual uint_t watch_file (const filesystem::path &Path, const sigc::slot< void > &Slot)=0
 Call a slot whenever given filesystem path is modified.
virtual void unwatch_file (const uint_t WatchID)=0
 Stop watching the given path.
virtual void wait_for_changes ()=0
 Blocks indefinitely until there is at least one file change ready to be signalled.
virtual const uint_t change_count ()=0
 Returns the number of file changes that are pending and ready to be signalled. This method never blocks.
virtual void signal_change ()=0
 Handles signalling for the next file change that is pending, if any. This method never blocks.

Protected Member Functions

 ifile_change_notifier ()
 ifile_change_notifier (const ifile_change_notifier &)
ifile_change_notifieroperator= (const ifile_change_notifier &)

Detailed Description

Interface implemented by objects that can signal changes to files.


Constructor & Destructor Documentation

virtual k3d::ifile_change_notifier::~ifile_change_notifier (  )  [inline, virtual]
k3d::ifile_change_notifier::ifile_change_notifier (  )  [inline, protected]
k3d::ifile_change_notifier::ifile_change_notifier ( const ifile_change_notifier  )  [inline, protected]

Member Function Documentation

virtual const uint_t k3d::ifile_change_notifier::change_count (  )  [pure virtual]

Returns the number of file changes that are pending and ready to be signalled. This method never blocks.

Implemented in module::inotify::file_change_notifier.

ifile_change_notifier& k3d::ifile_change_notifier::operator= ( const ifile_change_notifier  )  [inline, protected]
virtual void k3d::ifile_change_notifier::signal_change (  )  [pure virtual]

Handles signalling for the next file change that is pending, if any. This method never blocks.

Implemented in module::inotify::file_change_notifier.

virtual void k3d::ifile_change_notifier::unwatch_file ( const uint_t  WatchID  )  [pure virtual]

Stop watching the given path.

virtual void k3d::ifile_change_notifier::wait_for_changes (  )  [pure virtual]

Blocks indefinitely until there is at least one file change ready to be signalled.

Implemented in module::inotify::file_change_notifier.

virtual uint_t k3d::ifile_change_notifier::watch_file ( const filesystem::path Path,
const sigc::slot< void > &  Slot 
) [pure virtual]

Call a slot whenever given filesystem path is modified.

Note that we are watching the path, not an inode, so it isn't an error to specify a path for a nonexistent file. The slot will be called when a file is created / modified / renamed / deleted at that location. Returns a nonzero watch identifier that can be used to cancel the watch later-on, or 0 if there is an error.

Implemented in module::inotify::file_change_notifier.


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

Generated on Mon Mar 21 07:41:44 2011 for K-3D by doxygen 1.6.3