Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
35 template <
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; }
Guard(T *ptr, MutexType &mutex)
const T * operator->() const
void setMutex(MutexType *mut)
LockedHandle(T *ptr, MutexType &mut)
const T & operator*() const
void set(T *ptr, MutexType *mut)
Guard operator*()
Aquire and release the lock before and after the object is accessed.
Guard(const Guard &a)=delete
ConstGuard(const ConstGuard &a)=delete
ConstGuard operator*() const
Aquire and release the lock before and after the const object is accessed.
ConstGuard(const T *ptr, MutexType &mutex)
ConstGuard(ConstGuard &&a)
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.
LockedHandle(T *ptr, MutexType *mut)