CScriptHandle class
#include <Jazz2/Scripting/RegisterRef.h>
AngelScript reference handle
Generic handle that can refer to an object of any reference type, exposed to scripts as the ref type. It manages the reference count of the held object, supports assignment and comparison, and can be dynamically cast to a concrete handle type.
Constructors, destructors, conversion operators
- CScriptHandle()
- CScriptHandle(const CScriptHandle& other)
- CScriptHandle(void* ref, asITypeInfo* type)
- ~CScriptHandle()
-
CScriptHandle(void* ref,
std::
int32_t typeId) protected
Public functions
- auto operator=(const CScriptHandle& other) -> CScriptHandle&
- void Set(void* ref, asITypeInfo* type)
- auto operator==(const CScriptHandle& o) const -> bool
- auto operator!=(const CScriptHandle& o) const -> bool
-
auto Equals(void* ref,
std::
int32_t typeId) const -> bool -
void Cast(void** outRef,
std::
int32_t typeId) - auto GetType() const -> asITypeInfo*
-
auto GetTypeId() const -> std::
int32_t - auto GetRef() -> void*
- void EnumReferences(asIScriptEngine* engine)
- void ReleaseReferences(asIScriptEngine* engine)
Protected functions
- void ReleaseHandle()
- void AddRefHandle()
-
auto Assign(void* ref,
std::
int32_t typeId) -> CScriptHandle&
Friends
-
void Construct(CScriptHandle* self,
void* ref,
std::
int32_t typeId) - void RegisterRef(asIScriptEngine* engine)
- Registers
reftype to AngelScript engine.