diff -r 4bc3062476c8 -r 9646f7e37c31 src/squirrel_class.hpp --- a/src/squirrel_class.hpp Sun Mar 23 21:45:16 2008 +0000 +++ b/src/squirrel_class.hpp Tue Mar 25 12:09:42 2008 +0000 @@ -39,6 +39,16 @@ } /** + * This defines a method inside a class for Squirrel, which has access to the 'engine' (experts only!). + */ + template + void DefSQAdvancedMethod(Squirrel *engine, Func function_proc, const char *function_name) + { + using namespace SQConvert; + engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback, 0, NULL, &function_proc, sizeof(function_proc)); + } + + /** * This defines a method inside a class for Squirrel with defined the params. * @note If you define nparam, make sure that he first param is always 'x', * which is the 'this' inside the function. This is hidden from the rest