fawkes::FamThread Class Reference

FileAlterationMonitor thread wrapper. More...

#include <utils/system/fam_thread.h>

Inheritance diagram for fawkes::FamThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FamThread (RefPtr< FileAlterationMonitor > fam=RefPtr< FileAlterationMonitor >())
 Constructor.
RefPtr< FileAlterationMonitorget_fam ()
 Get FileAlterationMonitor.
virtual void loop ()
 Code to execute in the thread.

Protected Member Functions

virtual void run ()
 Stub to see name in backtrace for easier debugging.

Detailed Description

FileAlterationMonitor thread wrapper.

This thread wraps a FileAlterationMonitor and runs it continuously possibly causing FAM events in this thread context. This thread is useful if you have no good place to call FileAlterationMonitor::process_events() in your part.

Author:
Tim Niemueller

Definition at line 35 of file fam_thread.h.


Constructor & Destructor Documentation

fawkes::FamThread::FamThread ( RefPtr< FileAlterationMonitor fam = RefPtr<FileAlterationMonitor>()  ) 

Constructor.

Parameters:
fam optional RefPtr to FileAlterationMonitor. If none is given one is instantiated by the FamThread instance.

Definition at line 45 of file fam_thread.cpp.


Member Function Documentation

RefPtr< FileAlterationMonitor > fawkes::FamThread::get_fam (  ) 

Get FileAlterationMonitor.

Returns:
shared pointer to FileAlterationMonitor instance.

Definition at line 58 of file fam_thread.cpp.

void fawkes::FamThread::loop (  )  [virtual]

Code to execute in the thread.

Implement this method to hold the code you want to be executed continously. If you do not implement this method, the default is that the thread will exit. This is useful if you choose to only implement once().

Reimplemented from fawkes::Thread.

Definition at line 65 of file fam_thread.cpp.

virtual void fawkes::FamThread::run (  )  [inline, protected, virtual]

Stub to see name in backtrace for easier debugging.

See also:
Thread::run()

Reimplemented from fawkes::Thread.

Definition at line 45 of file fam_thread.h.


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1