![]() |
ezEngine
Release 25.03
|
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 | |
EZ_ALWAYS_INLINE | ezLockedObject (T &ref_lock, O *pObject) |
EZ_ALWAYS_INLINE | ezLockedObject (ezLockedObject< T, O > &&rhs) |
ezLockedObject (const ezLockedObject< T, O > &rhs)=delete | |
void | operator= (const ezLockedObject< T, O > &&rhs) |
void | operator= (const ezLockedObject< T, O > &rhs)=delete |
EZ_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.