|
OpenTTD Source 20260304-master-g1baaa74679
|
The Squirrel convert routines. More...
Functions | |
| template<typename Tcls, typename Tmethod, ScriptType Ttype> | |
| SQInteger | DefSQNonStaticCallback (HSQUIRRELVM vm) |
| A general template for all non-static method callbacks from Squirrel. | |
| template<typename Tcls, typename Tmethod, ScriptType Ttype> | |
| SQInteger | DefSQAdvancedNonStaticCallback (HSQUIRRELVM vm) |
| A general template for all non-static advanced method callbacks from Squirrel. | |
| template<typename Tcls, typename Tmethod> | |
| SQInteger | DefSQStaticCallback (HSQUIRRELVM vm) |
| A general template for all function/static method callbacks from Squirrel. | |
| template<typename Tcls, typename Tmethod> | |
| SQInteger | DefSQAdvancedStaticCallback (HSQUIRRELVM vm) |
| A general template for all static advanced method callbacks from Squirrel. | |
| template<typename Tcls> | |
| static SQInteger | DefSQDestructorCallback (SQUserPointer p, SQInteger) |
| A general template for the destructor of SQ instances. | |
| template<typename Tcls, typename Tmethod> | |
| SQInteger | DefSQConstructorCallback (HSQUIRRELVM vm) |
| A general template to handle creating of instance with any amount of params. | |
| template<typename Tcls> | |
| SQInteger | DefSQAdvancedConstructorCallback (HSQUIRRELVM vm) |
| A general template to handle creating of an instance with a complex constructor. | |
The Squirrel convert routines.
|
inline |
A general template to handle creating of an instance with a complex constructor.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 427 of file squirrel_helper.hpp.
References DefSQDestructorCallback().
|
inline |
A general template for all non-static advanced method callbacks from Squirrel.
In here the function_proc is recovered, and the SQCall is called that can handle this exact amount of params.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 288 of file squirrel_helper.hpp.
References Squirrel::GetInstance(), and PushClassName().
Referenced by DefSQClass< CL, ST >::DefSQAdvancedMethod().
|
inline |
A general template for all static advanced method callbacks from Squirrel.
In here the function_proc is recovered, and the SQCall is called that can handle this exact amount of params.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 361 of file squirrel_helper.hpp.
Referenced by DefSQClass< CL, ST >::DefSQAdvancedStaticMethod().
|
inline |
A general template to handle creating of instance with any amount of params.
It creates the instance in C++, and it sets all the needed settings in SQ to register the instance.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 403 of file squirrel_helper.hpp.
References DefSQDestructorCallback().
|
static |
A general template for the destructor of SQ instances.
This is needed here as it has to be in the same scope as DefSQConstructorCallback.
| p | Pointer to the instance to release. |
0 upon success. Has a return type due to this being passed as a parameter to another function. Definition at line 388 of file squirrel_helper.hpp.
Referenced by DefSQAdvancedConstructorCallback(), and DefSQConstructorCallback().
|
inline |
A general template for all non-static method callbacks from Squirrel.
In here the function_proc is recovered, and the SQCall is called that can handle this exact amount of params.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 243 of file squirrel_helper.hpp.
References Squirrel::GetInstance(), and PushClassName().
|
inline |
A general template for all function/static method callbacks from Squirrel.
In here the function_proc is recovered, and the SQCall is called that can handle this exact amount of params.
| vm | The virtual machine to create the callback in. |
0 upon success, or any other number upon failure. Definition at line 333 of file squirrel_helper.hpp.