![]() |
Leviathan
0.8.0.0
Leviathan game engine
|
Class for Scripts to receive and pass on references to locks in native or script stacks. More...
#include <ScriptLock.h>
Public Member Functions | |
DLLEXPORT | ScriptLockPasser (LockType &objectsguard) |
DLLEXPORT | ScriptLockPasser () |
Creates a passer that doesn't have a lock. More... | |
DLLEXPORT | ~ScriptLockPasser () |
DLLEXPORT auto | GetLock () |
Returns a reference to held lock. More... | |
DLLEXPORT void | MakeInvalid () |
Makes this invalid. More... | |
![]() | |
ReferenceCounted (const ReferenceCounted &other)=delete | |
ReferenceCounted & | operator= (const ReferenceCounted &other)=delete |
FORCE_INLINE void | AddRef () |
FORCE_INLINE void | Release () |
removes a reference and deletes the object if reference count reaches zero More... | |
int32_t | GetRefCount () const |
Returns the reference count. More... | |
Additional Inherited Members | |
![]() | |
using | basepointer = boost::intrusive_ptr< ReferenceCounted > |
using | refcountedpointer = boost::intrusive_ptr< ReferenceCounted > |
![]() | |
template<class ActualType > | |
static boost::intrusive_ptr< ActualType > | WrapPtr (ActualType *ptr) |
Creates an intrusive_ptr from raw pointer. More... | |
template<class ActualType , class... Args> | |
static boost::intrusive_ptr< ActualType > | MakeShared (Args &&... args) |
Constructs a new instance and wraps it. More... | |
![]() | |
DLLEXPORT | ReferenceCounted () |
virtual DLLEXPORT | ~ReferenceCounted () |
Class for Scripts to receive and pass on references to locks in native or script stacks.
Definition at line 13 of file ScriptLock.h.
|
inline |
Definition at line 16 of file ScriptLock.h.
|
inline |
Creates a passer that doesn't have a lock.
Definition at line 22 of file ScriptLock.h.
|
inline |
Definition at line 26 of file ScriptLock.h.
|
inline |
Returns a reference to held lock.
InvalidState | if this object doesn't hold a reference to a lock |
Calling this while MakeInvalid is called or this is being destructed is invalid
Definition at line 35 of file ScriptLock.h.
|
inline |
Makes this invalid.
Call before destructing the lock to which OurLockPtr points to
Definition at line 47 of file ScriptLock.h.