Torque::FS::FileSystemChangeNotifier Class Reference

#include <volume.h>

List of all members.

Public Types

typedef Signal< void(const
Path &)> 
ChangeSignal

Public Member Functions

 FileSystemChangeNotifier (FileSystem *fs)
virtual ~FileSystemChangeNotifier ()
ChangeSignalgetSignal ()
bool addNotification (const Path &path)
bool removeNotification (const Path &path)
void startNotifier ()
void stopNotifier ()
bool amNotifying () const

Protected Types

typedef List< FileInfoFileInfoList
typedef Map< Path, FileInfoListDirMap
 map a directory to a list of files and their mod times

Protected Member Functions

void process ()
virtual void internalProcessOnce ()=0
virtual bool internalAddNotification (const Path &dir)=0
 This is called so the inherited class can do its own bookkeeping on addNotification().
virtual bool internalRemoveNotification (const Path &dir)=0
 This is called so the inherited class can do its own bookkeeping on removeNotification().
void internalNotifyDirChanged (const Path &dir)
 Called by the inherited class to let us know a directory has changed so we can find the file which changed and notify on it.
void notifyFileChanged (const Path &path)

Protected Attributes

ChangeSignal mChangeSignal
FileSystemmFS
DirMap mDirMap
bool mNotifying

Classes

struct  FileInfo


Member Typedef Documentation

map a directory to a list of files and their mod times


Constructor & Destructor Documentation

Torque::FS::FileSystemChangeNotifier::FileSystemChangeNotifier ( FileSystem fs  )  [inline]

virtual Torque::FS::FileSystemChangeNotifier::~FileSystemChangeNotifier (  )  [inline, virtual]


Member Function Documentation

ChangeSignal& Torque::FS::FileSystemChangeNotifier::getSignal (  )  [inline]

bool Torque::FS::FileSystemChangeNotifier::addNotification ( const Path path  ) 

bool Torque::FS::FileSystemChangeNotifier::removeNotification ( const Path path  ) 

void Torque::FS::FileSystemChangeNotifier::startNotifier (  ) 

void Torque::FS::FileSystemChangeNotifier::stopNotifier (  ) 

bool Torque::FS::FileSystemChangeNotifier::amNotifying (  )  const [inline]

void Torque::FS::FileSystemChangeNotifier::process (  )  [protected]

virtual void Torque::FS::FileSystemChangeNotifier::internalProcessOnce (  )  [protected, pure virtual]

virtual bool Torque::FS::FileSystemChangeNotifier::internalAddNotification ( const Path dir  )  [protected, pure virtual]

This is called so the inherited class can do its own bookkeeping on addNotification().

Note:
We pass the directory here, not the file

virtual bool Torque::FS::FileSystemChangeNotifier::internalRemoveNotification ( const Path dir  )  [protected, pure virtual]

This is called so the inherited class can do its own bookkeeping on removeNotification().

Note:
We pass the directory here, not the file

void Torque::FS::FileSystemChangeNotifier::internalNotifyDirChanged ( const Path dir  )  [protected]

Called by the inherited class to let us know a directory has changed so we can find the file which changed and notify on it.

void Torque::FS::FileSystemChangeNotifier::notifyFileChanged ( const Path path  )  [protected]


Member Data Documentation