CConditionalUnlockMutexAtDestruction Class Reference

#include <mutex.H>

Inheritance diagram for CConditionalUnlockMutexAtDestruction:

Inheritance graph
[legend]
Collaboration diagram for CConditionalUnlockMutexAtDestruction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CConditionalUnlockMutexAtDestruction (CMutex &myMutex, const bool initial_condition)
 ~CConditionalUnlockMutexAtDestruction ()
void set_condition (const bool new_condition=true)

Private Attributes

CMutexmutex
bool condition


Detailed Description

The CConditionalUnlockMutexAtDestruction registers a mutex on construction and unlocks it at destruction, iff (that is: if and only if) it has been said to do so. It can be used to guarantee, that the registered mutex is unlocked after the critical section protected by this mutex is left (regardless, whether by a normal ending of the block, a return call or because an exception is thrown).

Definition at line 128 of file mutex.H.


Constructor & Destructor Documentation

CConditionalUnlockMutexAtDestruction::CConditionalUnlockMutexAtDestruction ( CMutex myMutex,
const bool  initial_condition 
) [inline]

Definition at line 134 of file mutex.H.

CConditionalUnlockMutexAtDestruction::~CConditionalUnlockMutexAtDestruction (  )  [inline]

Definition at line 136 of file mutex.H.


Member Function Documentation

void CConditionalUnlockMutexAtDestruction::set_condition ( const bool  new_condition = true  )  [inline]

Definition at line 137 of file mutex.H.

References condition, mutex, and CMutex::unlock().

Here is the call graph for this function:


Member Data Documentation

CMutex& CConditionalUnlockMutexAtDestruction::mutex [private]

Definition at line 131 of file mutex.H.

Referenced by set_condition().

bool CConditionalUnlockMutexAtDestruction::condition [private]

Definition at line 132 of file mutex.H.

Referenced by set_condition().


The documentation for this class was generated from the following file:
Generated on Wed Nov 7 23:30:45 2007 for Qsieve by  doxygen 1.5.4