载入中...
搜索中...
未找到
eve::script::detail 命名空间参考

类

struct  RuntimeSlotCoordinates
 Slot coordinates without the domain tag. 更多...
 
class  RuntimeSlotStore
 Tag-free slot store behind every RuntimeObjectRegistry<T, Tag>. 更多...
 

类型定义

using OwnedInstanceDestroy = void(*)(void *) noexcept
 Destroys one owned C++ wrapper without knowing its type.
 

函数

template<class T >
void ownedInstanceDestroy (void *pointer) noexcept
 Type-erased cleanup used when the VM never took the object.
 
Diagnostic ownedInstanceArgumentDiagnostic ()
 Diagnostic for a null VM or null object, built once instead of per T.
 
Result< ssq::Object > makeOwnedSquirrelInstanceRaw (HSQUIRRELVM vm, void *object, SquirrelReleaseHook releaseHook, OwnedInstanceDestroy destroy, std::size_t typeHash)
 Non-template core of makeOwnedSquirrelInstance.
 

类型定义说明

◆ OwnedInstanceDestroy

using eve::script::detail::OwnedInstanceDestroy = typedef void (*)(void*) noexcept

Destroys one owned C++ wrapper without knowing its type.

在文件 RuntimeRegistry.h 第 105 行定义.

函数说明

◆ makeOwnedSquirrelInstanceRaw()

eve::Result< ssq::Object > eve::script::detail::makeOwnedSquirrelInstanceRaw ( HSQUIRRELVM  vm,
void *  object,
SquirrelReleaseHook  releaseHook,
OwnedInstanceDestroy  destroy,
std::size_t  typeHash 
)

Non-template core of makeOwnedSquirrelInstance.

Every type-dependent fact arrives as a value or a hook, so the ~45 lines of stack discipline, instance creation, typing, rooting and exception handling are emitted once instead of once per wrapper type.

参数
vmActive Squirrel VM.
objectOwnership transfers to this call on entry.
releaseHookHook the created instance will run to destroy object.
destroyCleanup used only on a failure path that never reached the VM.
typeHashValue of squirrelTypeHash<T*>() for the instance type tag.
返回
The rooted instance, or a structured failure. @ownership On success the VM owns object. On failure this call either destroyed it once through destroy, or already handed it to a live instance whose release hook will run. It never leaks and never double-frees.

在文件 SquirrelOwnership.cpp 第 26 行定义.

引用了 destroy, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Result< T >::success(), top , 以及 vm.

◆ ownedInstanceArgumentDiagnostic()

Diagnostic eve::script::detail::ownedInstanceArgumentDiagnostic ( )

Diagnostic for a null VM or null object, built once instead of per T.

在文件 SquirrelOwnership.cpp 第 21 行定义.

引用了 eve::Diagnostic::error() , 以及 eve::InvalidArgument.

◆ ownedInstanceDestroy()

template<class T >
void eve::script::detail::ownedInstanceDestroy ( void *  pointer)
noexcept

Type-erased cleanup used when the VM never took the object.

Owned instance destroy.

在文件 RuntimeRegistry.h 第 110 行定义.