Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

L1394::MutexGuard Class Reference

This class can be used to ensure that a locked mutex is unlocked if you leave the scope. More...

#include <Thread.hpp>

List of all members.

Public Member Functions

 MutexGuard (const ThreadMutex &mutex)
 Constructor Locks the mutex.
 ~MutexGuard ()
 Destructor Unlocks the Mutex, if it is not unlocked before.
void unlock () const
 This method unlocks the Mutex, if this MutexGuard is the owner.
void lock () const
 This method locks the mutex and sets.


Detailed Description

This class can be used to ensure that a locked mutex is unlocked if you leave the scope.

Definition at line 64 of file Thread.hpp.


Constructor & Destructor Documentation

L1394::MutexGuard::MutexGuard const ThreadMutex mutex  )  [inline]
 

Constructor Locks the mutex.

Definition at line 69 of file Thread.hpp.

References lock().

L1394::MutexGuard::~MutexGuard  )  [inline]
 

Destructor Unlocks the Mutex, if it is not unlocked before.

Definition at line 74 of file Thread.hpp.

References L1394::ThreadMutex::unlock().


Member Function Documentation

void L1394::MutexGuard::lock  )  const [inline]
 

This method locks the mutex and sets.

Definition at line 82 of file Thread.hpp.

References L1394::ThreadMutex::lock().

Referenced by MutexGuard().

void L1394::MutexGuard::unlock  )  const [inline]
 

This method unlocks the Mutex, if this MutexGuard is the owner.

Definition at line 78 of file Thread.hpp.

References L1394::ThreadMutex::unlock().


The documentation for this class was generated from the following file:
Generated on Wed Aug 24 00:36:45 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/