类 | |
| struct | Call |
| struct | Call< R(*)(Args...)> |
| struct | Call< R(C::*)(Args...) const > |
| struct | Call< R(C::*)(Args...)> |
| struct | MemberCall |
| struct | PushResult |
| struct | PushResult< std::tuple< T... > > |
| struct | PushResult< std::vector< T, Alloc > > |
| 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. | |
| void | bindPointer (ssq::Class &cls, const char *name, const void *pointer, size_t size, SQFUNCTION invoke, SQInteger arity, const char *params, bool isStatic) |
| template<class Pointer > | |
| SQInteger | invokePointer (HSQUIRRELVM vm) |
| 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 第 38 行定义.
函数说明
◆ bindPointer()
| EVENGINE_API_FOUNDATION void eve::script::detail::bindPointer | ( | ssq::Class & | cls, |
| const char * | name, | ||
| const void * | pointer, | ||
| size_t | size, | ||
| SQFUNCTION | invoke, | ||
| SQInteger | arity, | ||
| const char * | params, | ||
| bool | isStatic | ||
| ) |
在文件 ScriptBinding.cpp 第 5 行定义.
引用了 cls, name, params, pointer, size, top , 以及 vm.
被这些函数引用 eve::script::bindPointerMethod().
◆ invokePointer()
| SQInteger eve::script::detail::invokePointer | ( | HSQUIRRELVM | vm | ) |
在文件 ScriptBinding.h 第 75 行定义.
引用了 pointer, eve::script::detail::PushResult< R >::push() , 以及 vm.
◆ 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.
- 参数
-
vm Active Squirrel VM. object Ownership transfers to this call on entry. releaseHook Hook the created instance will run to destroy object.destroy Cleanup used only on a failure path that never reached the VM. typeHash Value 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 throughdestroy, 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(), result, 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()
|
noexcept |
Type-erased cleanup used when the VM never took the object.
Owned instance destroy.
在文件 RuntimeRegistry.h 第 43 行定义.
引用了 pointer.