![]() |
Plasma Engine
2.0
|
Provides access to an object while managing a lock (e.g. a mutex) that ensures that during its lifetime the access to the object happens under the lock. More...
#include <LockedObject.h>
Public Member Functions | |
PL_ALWAYS_INLINE | plLockedObject (T &ref_lock, O *pObject) |
PL_ALWAYS_INLINE | plLockedObject (plLockedObject< T, O > &&rhs) |
plLockedObject (const plLockedObject< T, O > &rhs)=delete | |
void | operator= (const plLockedObject< T, O > &&rhs) |
void | operator= (const plLockedObject< T, O > &rhs)=delete |
PL_ALWAYS_INLINE bool | isValid () const |
Whether the encapsulated object exists at all or is nullptr. | |
O * | Borrow () |
const O * | Borrow () const |
O * | operator-> () |
const O * | operator-> () const |
O & | operator* () |
const O & | operator* () const |
bool | operator== (const O *rhs) const |
bool | operator!= (const O *rhs) const |
bool | operator! () const |
operator bool () const | |
Provides access to an object while managing a lock (e.g. a mutex) that ensures that during its lifetime the access to the object happens under the lock.