solarpowerlog trunk
CMutexAutoLock Class Reference

#include <CMutexHelper.h>

List of all members.

Public Member Functions

 CMutexAutoLock (boost::mutex *mutex)
virtual ~CMutexAutoLock ()

Detailed Description

Mutex Wrapper

The library makes you keeping track when you entered the Mutex. This generates the problem, that if the function is left without considering the lock, the lock remains forever.

This class helps in this case: Just create an object of it, passing the "this" pointer to the constructor (assuming your class is derived from Mutex) and enjoy the lock.

The lock is automatically destroyed on destrucing the object.

Definition at line 54 of file CMutexHelper.h.


Constructor & Destructor Documentation

CMutexAutoLock::CMutexAutoLock ( boost::mutex *  mutex)

Definition at line 41 of file CMutexHelper.cpp.

CMutexAutoLock::~CMutexAutoLock ( ) [virtual]

Definition at line 46 of file CMutexHelper.cpp.


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