eq::base::ScopedMutex Class Reference

A scoped mutex. More...

#include <scopedMutex.h>

Inheritance diagram for eq::base::ScopedMutex:
Inheritance graph
[legend]
Collaboration diagram for eq::base::ScopedMutex:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScopedMutex (Lock *lock)
 Construct a new scoped mutex and set the given lock.
 ScopedMutex (Lock &lock)
 Construct a new scoped mutex and set the given lock.
template<typename L >
 ScopedMutex (L &lockable)
 Construct a new scoped mutex for the given Lockable data structure.
 ~ScopedMutex ()
 Destruct the scoped mutex and unset the mutex.

Detailed Description

A scoped mutex.

The mutex is automatically set upon creation, and released when the scoped mutex is destroyed, e.g., when the scope is left. The scoped mutex does nothing if a 0 pointer for the lock is passed.

Definition at line 37 of file scopedMutex.h.


Constructor & Destructor Documentation

eq::base::ScopedMutex::ScopedMutex ( Lock lock  )  [inline, explicit]

Construct a new scoped mutex and set the given lock.

Providing no Lock (0) is allowed, in which case the scoped mutex does nothing.

Parameters:
lock the mutex to set and unset, or 0.
Version:
1.0

Definition at line 49 of file scopedMutex.h.

References eq::base::Lock::set().

Here is the call graph for this function:

eq::base::ScopedMutex::ScopedMutex ( Lock lock  )  [inline, explicit]

Construct a new scoped mutex and set the given lock.

Version:
1.0

Definition at line 53 of file scopedMutex.h.

References eq::base::Lock::set().

Here is the call graph for this function:

template<typename L >
eq::base::ScopedMutex::ScopedMutex ( L &  lockable  )  [inline]

Construct a new scoped mutex for the given Lockable data structure.

Version:
1.0

Definition at line 60 of file scopedMutex.h.

References eq::base::Lock::set().

Here is the call graph for this function:

eq::base::ScopedMutex::~ScopedMutex (  )  [inline]

Destruct the scoped mutex and unset the mutex.

Version:
1.0

Definition at line 64 of file scopedMutex.h.

References eq::base::Lock::unset().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat Feb 6 13:08:28 2010 for Equalizer 0.9.1 by  doxygen 1.6.1