![]() |
The Gaudi Framework
master (ff829712)
|
Provides automatic lock/unlock access to a class upon deref of ptr. More...
#include </builds/gaudi/Gaudi/GaudiKernel/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. | |
Guard | operator-> () |
Aquire and release the lock before and after the object is accessed. | |
ConstGuard | operator* () const |
Aquire and release the lock before and after the const object is accessed. | |
ConstGuard | operator-> () const |
Aquire and release the lock before and after the const object is accessed. | |
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 36 of file LockedHandle.h.
|
inline |
Definition at line 38 of file LockedHandle.h.
|
inline |
|
inline |
Definition at line 40 of file LockedHandle.h.
|
inline |
Definition at line 41 of file LockedHandle.h.
|
inline |
Definition at line 50 of file LockedHandle.h.
|
inline |
Definition at line 100 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the object is accessed.
Definition at line 89 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the const object is accessed.
Definition at line 95 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the object is accessed.
Definition at line 92 of file LockedHandle.h.
|
inline |
Aquire and release the lock before and after the const object is accessed.
Definition at line 98 of file LockedHandle.h.
|
inline |
|
inline |
Definition at line 48 of file LockedHandle.h.
|
mutableprivate |
Definition at line 104 of file LockedHandle.h.
|
private |
Definition at line 103 of file LockedHandle.h.