Public Member Functions | Private Attributes
icl_core::thread::ScopedMutexLock Class Reference

Manages locking and unlocking of a mutes. More...

#include <ScopedMutexLock.h>

Inheritance diagram for icl_core::thread::ScopedMutexLock:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool isLocked () const
 operator bool () const
 ScopedMutexLock (Mutex &mutex, bool force=true)
 ~ScopedMutexLock ()

Private Attributes

bool m_is_locked
Mutexm_mutex

Detailed Description

Manages locking and unlocking of a mutes.

Locks or tries to lock a mutex in the constructor and unlocks it in the destructor.

Definition at line 37 of file ScopedMutexLock.h.


Constructor & Destructor Documentation

icl_core::thread::ScopedMutexLock::ScopedMutexLock ( Mutex mutex,
bool  force = true 
) [explicit]

Locks the mutex.

Parameters:
mutexThe mutex to use.
forceEnsure at all cost that IsLocked() is true.

Definition at line 17 of file ScopedMutexLock.cpp.

Unlocks the mutex.

Definition at line 27 of file ScopedMutexLock.cpp.


Member Function Documentation

Check if the mutex has been successfully locked.

Definition at line 51 of file ScopedMutexLock.h.

icl_core::thread::ScopedMutexLock::operator bool ( ) const [inline]

Implicit conversion to bool.

Definition at line 55 of file ScopedMutexLock.h.


Member Data Documentation

Definition at line 70 of file ScopedMutexLock.h.

Definition at line 69 of file ScopedMutexLock.h.


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


schunk_svh_driver
Author(s): Georg Heppner
autogenerated on Fri Aug 28 2015 12:59:20