cxxtools::RecursiveLock Class Reference

Lock class for recursive mutexes. More...

#include <cxxtools/mutex.h>

Inheritance diagram for cxxtools::RecursiveLock:
cxxtools::NonCopyable

Public Member Functions

 RecursiveLock (RecursiveMutex &m, bool doLock=true, bool isLocked=false)
 Construct to guard a RecursiveMutex.
 ~RecursiveLock ()
 Unlocks the mutex unless unlock() was called.
void lock ()
void unlock ()
 Unlock so that the destructor does not unlock.
RecursiveMutexmutex ()
 Returns the guarded the mutex object.
const RecursiveMutexmutex () const
 Returns the guarded the mutex object.

Additional Inherited Members

- Private Member Functions inherited from cxxtools::NonCopyable
 NonCopyable ()

Detailed Description

Lock class for recursive mutexes.

Constructor & Destructor Documentation

cxxtools::RecursiveLock::RecursiveLock ( RecursiveMutex m,
bool  doLock = true,
bool  isLocked = false 
)
inline

Construct to guard a RecursiveMutex.

Constructs a RecursiveLock object and locks the enclosing recursive mutex if doLock is true. If isLocked is true, the RecursiveLock will only unlock the given mutex in the destructor, but not lock it in the constructor.

cxxtools::RecursiveLock::~RecursiveLock ( )
inline

Unlocks the mutex unless unlock() was called.

Member Function Documentation

void cxxtools::RecursiveLock::lock ( )
inline
RecursiveMutex& cxxtools::RecursiveLock::mutex ( )
inline

Returns the guarded the mutex object.

const RecursiveMutex& cxxtools::RecursiveLock::mutex ( ) const
inline

Returns the guarded the mutex object.

void cxxtools::RecursiveLock::unlock ( )
inline

Unlock so that the destructor does not unlock.


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