LRAUV  revA
MutexLocker Class Reference

An implementation of RAII for the Mutex. More...

#include <Mutex.h>

Collaboration diagram for MutexLocker:

Public Member Functions

 MutexLocker (Mutex &mutex)
 Constructor "creates" a lock on the mutex. More...
 
 ~MutexLocker ()
 Destructor "destroys" the lock on the mutex. More...
 

Private Attributes

Mutexmutex_
 Reference to keep track of the Mutex. More...
 

Detailed Description

An implementation of RAII for the Mutex.

Constructor & Destructor Documentation

MutexLocker::MutexLocker ( Mutex mutex)

Constructor "creates" a lock on the mutex.

References Mutex::lock(), and mutex_.

MutexLocker::~MutexLocker ( )

Destructor "destroys" the lock on the mutex.

References mutex_, and Mutex::unlock().

Member Data Documentation

Mutex& MutexLocker::mutex_
private

Reference to keep track of the Mutex.

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


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