MutexLocker Class Reference

Helper class to lock a Mutex inside a scope. More...

#include <mutex.h>

List of all members.

Public Member Functions

 MutexLocker (Mutex *mutex)
 ~MutexLocker ()

Private Attributes

Mutexm_mutex


Detailed Description

Helper class to lock a Mutex inside a scope.

Create a temporary MutexLocker object to lock a mutex inside a scope.

Yes, I know that there are numerous libraries that do the same and better. But I find it essential to keep the dependencies as low as possible for thin clients.

Definition at line 70 of file mutex.h.


Constructor & Destructor Documentation

MutexLocker::MutexLocker Mutex mutex  )  [inline]
 

Definition at line 73 of file mutex.h.

References Mutex::lock(), and m_mutex.

MutexLocker::~MutexLocker  )  [inline]
 

Definition at line 74 of file mutex.h.

References m_mutex, and Mutex::unlock().


Member Data Documentation

Mutex* MutexLocker::m_mutex [private]
 

Definition at line 77 of file mutex.h.

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


The documentation for this class was generated from the following file:
Generated on Mon Jan 22 23:24:19 2007 for cdmm by  doxygen 1.4.6