(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)

This commit is contained in:
truebrain
2011-11-29 22:23:33 +00:00
parent b13fa6924b
commit bff7c33aa9
54 changed files with 190 additions and 185 deletions

View File

@@ -18,7 +18,7 @@
* The template to define classes in Squirrel. It takes care of the creation
* and calling of such classes, to minimize the API layer.
*/
template <class CL>
template <class CL, ScriptType ST>
class DefSQClass {
private:
const char *classname;
@@ -35,7 +35,7 @@ public:
void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name)
{
using namespace SQConvert;
engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
@@ -45,7 +45,7 @@ public:
void DefSQAdvancedMethod(Squirrel *engine, Func function_proc, const char *function_name)
{
using namespace SQConvert;
engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
@@ -58,7 +58,7 @@ public:
void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name, int nparam, const char *params)
{
using namespace SQConvert;
engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, nparam, params, &function_proc, sizeof(function_proc));
engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, nparam, params, &function_proc, sizeof(function_proc));
}
/**