FX::FXMutexLock Class Reference

#include <FXThread.h>

List of all members.


Detailed Description

An easy way to establish a correspondence between a C++ scope and a critical section is to simply declare an FXMutexLock at the beginning of the scope. The mutex will be automatically released when the scope is left (either by natural means or by means of an exception.

Public Member Functions

 FXMutexLock (FXMutex &m)
FXMutexmutex ()
void lock ()
FXbool trylock ()
FXbool locked ()
void unlock ()
 ~FXMutexLock ()

Constructor & Destructor Documentation

FX::FXMutexLock::FXMutexLock ( FXMutex m  )  [inline]

Construct & lock associated mutex.

FX::FXMutexLock::~FXMutexLock (  )  [inline]

Destroy and unlock associated mutex.


Member Function Documentation

FXMutex& FX::FXMutexLock::mutex (  )  [inline]

Return reference to associated mutex.

void FX::FXMutexLock::lock (  )  [inline]

Lock mutex.

FXbool FX::FXMutexLock::trylock (  )  [inline]

Return TRUE if succeeded locking the mutex.

FXbool FX::FXMutexLock::locked (  )  [inline]

Return TRUE if mutex is already locked.

void FX::FXMutexLock::unlock (  )  [inline]

Unlock mutex.


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:21:16 2008 for TnFOX by doxygen v1.5.6