35template <
class T,
class MutexType = std::mutex>
43 void set( T* ptr, MutexType* mut ) {
63 operator T&() {
return *
m_ptr; }
81 operator const T&()
const {
return *
m_ptr; }
100 operator bool()
const {
return m_ptr; }
ConstGuard(ConstGuard &&a)
const T * operator->() const
ConstGuard(const ConstGuard &a)=delete
const T & operator*() const
ConstGuard(const T *ptr, MutexType &mutex)
Guard(T *ptr, MutexType &mutex)
Guard(const Guard &a)=delete
LockedHandle(T *ptr, MutexType &mut)
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.
void set(T *ptr, MutexType *mut)
LockedHandle(T *ptr, MutexType *mut)
Guard operator->()
Aquire and release the lock before and after the object is accessed.
void setMutex(MutexType *mut)
Guard operator*()
Aquire and release the lock before and after the object is accessed.