OpenTTD
|
The Squirrel convert routines. More...
Functions | |
template<typename T > | |
static int | Return (HSQUIRRELVM vm, T t) |
To return a value to squirrel, we call this function. | |
template<> | |
int | Return< uint8 > (HSQUIRRELVM vm, uint8 res) |
template<> | |
int | Return< uint16 > (HSQUIRRELVM vm, uint16 res) |
template<> | |
int | Return< uint32 > (HSQUIRRELVM vm, uint32 res) |
template<> | |
int | Return< int8 > (HSQUIRRELVM vm, int8 res) |
template<> | |
int | Return< int16 > (HSQUIRRELVM vm, int16 res) |
template<> | |
int | Return< int32 > (HSQUIRRELVM vm, int32 res) |
template<> | |
int | Return< int64 > (HSQUIRRELVM vm, int64 res) |
template<> | |
int | Return< Money > (HSQUIRRELVM vm, Money res) |
template<> | |
int | Return< bool > (HSQUIRRELVM vm, bool res) |
template<> | |
int | Return< char * > (HSQUIRRELVM vm, char *res) |
template<> | |
int | Return< const char * > (HSQUIRRELVM vm, const char *res) |
template<> | |
int | Return< void * > (HSQUIRRELVM vm, void *res) |
template<> | |
int | Return< HSQOBJECT > (HSQUIRRELVM vm, HSQOBJECT res) |
template<typename T > | |
static T | GetParam (ForceType< T >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
To get a param from squirrel, we call this function. | |
template<> | |
uint8 | GetParam (ForceType< uint8 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
uint16 | GetParam (ForceType< uint16 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
uint32 | GetParam (ForceType< uint32 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
int8 | GetParam (ForceType< int8 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
int16 | GetParam (ForceType< int16 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
int32 | GetParam (ForceType< int32 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
int64 | GetParam (ForceType< int64 >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
Money | GetParam (ForceType< Money >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
bool | GetParam (ForceType< bool >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
void * | GetParam (ForceType< void * >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
const char * | GetParam (ForceType< const char * >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
template<> | |
Array * | GetParam (ForceType< Array * >, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) |
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 size) |
A general template for the destructor of SQ instances. | |
template<typename Tcls , typename Tmethod , int Tnparam> | |
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 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.
Definition at line 780 of file squirrel_helper.hpp.
References Squirrel::GetInstance().
|
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.
Definition at line 842 of file squirrel_helper.hpp.
|
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.
Definition at line 875 of file squirrel_helper.hpp.
|
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.
Definition at line 862 of file squirrel_helper.hpp.
|
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.
Definition at line 738 of file squirrel_helper.hpp.
References Squirrel::GetInstance().
|
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.
Definition at line 818 of file squirrel_helper.hpp.
|
static |
To get a param from squirrel, we call this function.
It converts to the right format.
|
static |
To return a value to squirrel, we call this function.
It converts to the right format.