fesa::Lock Class Reference

This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex. More...

#include <Lock.h>

List of all members.

Public Member Functions

 Lock (AbstractMutex &m)
 Lock the associated mutex.
 ~Lock ()
 unlock the associated mutex

Private Member Functions

 Lock (const Lock &)
void operator= (const AbstractMutex &)

Private Attributes

AbstractMutexm_

Detailed Description

This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex.

Definition at line 18 of file Lock.h.


Constructor & Destructor Documentation

fesa::Lock::Lock ( AbstractMutex m  )  [inline]

Lock the associated mutex.

Definition at line 25 of file Lock.h.

References fesa::AbstractMutex::lock(), and m_.

fesa::Lock::~Lock (  )  [inline]

unlock the associated mutex

Definition at line 30 of file Lock.h.

References m_, and fesa::AbstractMutex::unlock().

fesa::Lock::Lock ( const Lock  )  [private]

Member Function Documentation

void fesa::Lock::operator= ( const AbstractMutex  )  [private]

Member Data Documentation

Definition at line 33 of file Lock.h.

Referenced by Lock(), and ~Lock().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1