![]() |
The Gaudi Framework
v31r0 (aeb156f0)
|
Provides automatic lock/unlock access to a class upon deref of ptr. More...
#include <GaudiKernel/LockedHandle.h>
Classes | |
class | ConstGuard |
class | Guard |
Public Member Functions | |
LockedHandle (T *ptr, MutexType &mut) | |
LockedHandle (T *ptr, MutexType *mut) | |
LockedHandle (T *ptr) | |
LockedHandle () | |
void | set (T *ptr, MutexType *mut) |
void | setMutex (MutexType *mut) |
T * | get () const |
Guard | operator* () |
Aquire and release the lock before and after the object is accessed. More... | |
Guard | operator-> () |
Aquire and release the lock before and after the object is accessed. More... | |
ConstGuard | operator* () const |
Aquire and release the lock before and after the const object is accessed. More... | |
ConstGuard | operator-> () const |
Aquire and release the lock before and after the const object is accessed. More... | |
operator bool () const | |
Private Attributes | |
T * | m_ptr |
MutexType * | m_mutex |
Provides automatic lock/unlock access to a class upon deref of ptr.
default type of mutex to use is a std::mutex, but this can be overridden with a second template parameter, as long as the type provides the lock() and unlock() functions
Definition at line 28 of file LockedHandle.h.
|
inline |
Definition at line 30 of file LockedHandle.h.
|
inline |
Definition at line 31 of file LockedHandle.h.
|
inline |
Definition at line 32 of file LockedHandle.h.
|
inline |
Definition at line 33 of file LockedHandle.h.
|
inline |
Definition at line 42 of file LockedHandle.h.
|
inline |
Definition at line 92 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the object is accessed.
Definition at line 81 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the const object is accessed.
Definition at line 87 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the object is accessed.
Definition at line 84 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the const object is accessed.
Definition at line 90 of file LockedHandle.h.
|
inline |
Definition at line 35 of file LockedHandle.h.
|
inline |
Definition at line 40 of file LockedHandle.h.
|
mutableprivate |
Definition at line 96 of file LockedHandle.h.
|
private |
Definition at line 95 of file LockedHandle.h.