// // SqratMemberMethods: Member Methods // // // Copyright (c) 2009 Brandon Jones // Copyright 2011 Li-Cheng (Andy) Tai // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // #if !defined(_SCRAT_MEMBER_METHODS_H_) #define _SCRAT_MEMBER_METHODS_H_ #ifdef SQMOD_PLUGIN_API #include #else #include #endif // SQMOD_PLUGIN_API #include "sqratTypes.h" namespace Sqrat { /// @cond DEV // // Squirrel Global Functions // template class SqMember { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() R ret = (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)() const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() R ret = (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 9 template static SQInteger Func9(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func9C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 10 template static SQInteger Func10(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func10C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 11 template static SQInteger Func11(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func11C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 12 template static SQInteger Func12(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func12C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 13 template static SQInteger Func13(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func13C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 14 template static SQInteger Func14(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func14C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } }; // // reference return specialization // template class SqMember { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() R& ret = (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)() const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() R& ret = (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 9 template static SQInteger Func9(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func9C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 10 template static SQInteger Func10(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func10C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 11 template static SQInteger Func11(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func11C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 12 template static SQInteger Func12(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func12C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 13 template static SQInteger Func13(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R&(C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func13C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 14 template static SQInteger Func14(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func14C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } }; // // void return specialization // template class SqMember { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)() const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() (ptr->*method)(); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 9 template static SQInteger Func9(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func9C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 11) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 10 template static SQInteger Func10(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func10C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 12) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 11 template static SQInteger Func11(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func11C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 13) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 12 template static SQInteger Func12(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func12C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 14) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 13 template static SQInteger Func13(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func13C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 15) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 14 template static SQInteger Func14(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func14C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) != 16) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); Var a9(vm, 10); Var a10(vm, 11); Var a11(vm, 12); Var a12(vm, 13); Var a13(vm, 14); Var a14(vm, 15); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, a9.value, a10.value, a11.value, a12.value, a13.value, a14.value ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } }; // // Member Function Resolvers // // Arg Count 0 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)()) { return &SqMember::template Func0; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)() const) { return &SqMember::template Func0C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)()) { return &SqMember::template Func0; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)() const) { return &SqMember::template Func0C; } // Arg Count 1 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1)) { return &SqMember::template Func1; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1) const) { return &SqMember::template Func1C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1)) { return &SqMember::template Func1; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1) const) { return &SqMember::template Func1C; } // Arg Count 2 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2)) { return &SqMember::template Func2; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2) const) { return &SqMember::template Func2C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2)) { return &SqMember::template Func2; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2) const) { return &SqMember::template Func2C; } // Arg Count 3 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3)) { return &SqMember::template Func3; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3) const) { return &SqMember::template Func3C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3)) { return &SqMember::template Func3; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3) const) { return &SqMember::template Func3C; } // Arg Count 4 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4)) { return &SqMember::template Func4; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4) const) { return &SqMember::template Func4C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4)) { return &SqMember::template Func4; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4) const) { return &SqMember::template Func4C; } // Arg Count 5 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5)) { return &SqMember::template Func5; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5) const) { return &SqMember::template Func5C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5)) { return &SqMember::template Func5; } template inline SQFUNCTION SqMemberFunc(R&(C::* /*method*/)(A1, A2, A3, A4, A5) const) { return &SqMember::template Func5C; } // Arg Count 6 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6)) { return &SqMember::template Func6; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6) const) { return &SqMember::template Func6C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6)) { return &SqMember::template Func6; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6) const) { return &SqMember::template Func6C; } // Arg Count 7 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7)) { return &SqMember::template Func7; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7) const) { return &SqMember::template Func7C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7)) { return &SqMember::template Func7; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7) const) { return &SqMember::template Func7C; } // Arg Count 8 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8)) { return &SqMember::template Func8; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8) const) { return &SqMember::template Func8C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8)) { return &SqMember::template Func8; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8) const) { return &SqMember::template Func8C; } // Arg Count 9 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9)) { return &SqMember::template Func9; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const) { return &SqMember::template Func9C; } template inline SQFUNCTION SqMemberFunc(R&(C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9)) { return &SqMember::template Func9; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const) { return &SqMember::template Func9C; } // Arg Count 10 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) { return &SqMember::template Func10; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) const) { return &SqMember::template Func10C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) { return &SqMember::template Func10; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) const) { return &SqMember::template Func10C; } // Arg Count 11 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)) { return &SqMember::template Func11; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) const) { return &SqMember::template Func11C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)) { return &SqMember::template Func11; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) const) { return &SqMember::template Func11C; } // Arg Count 12 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)) { return &SqMember::template Func12; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) const) { return &SqMember::template Func12C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)) { return &SqMember::template Func12; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) const) { return &SqMember::template Func12C; } // Arg Count 13 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)) { return &SqMember::template Func13; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) const) { return &SqMember::template Func13C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)) { return &SqMember::template Func13; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) const) { return &SqMember::template Func13C; } // Arg Count 14 template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)) { return &SqMember::template Func14; } template inline SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) const) { return &SqMember::template Func14C; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)) { return &SqMember::template Func14; } template inline SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) const) { return &SqMember::template Func14C; } template class SqMemberFmt { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true, sq_gettop(vm) == 2); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true, sq_gettop(vm) == 2); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVar(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } }; // // reference return specialization // template class SqMemberFmt { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true, sq_gettop(vm) == 2); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true, sq_gettop(vm) == 2); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef R& (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } R& ret = (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } PushVarR(vm, ret); SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 1; } }; // // void return specialization // template class SqMemberFmt { public: // Arg Count 0 template static SQInteger Func0(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true, sq_gettop(vm) == 2); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func0C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 2) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() const StackStrF fmt(vm, 2, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)(fmt); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 1 template static SQInteger Func1(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func1C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 3) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 3, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 2 template static SQInteger Func2(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func2C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 4) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 4, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 3 template static SQInteger Func3(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func3C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 5) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 5, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 4 template static SQInteger Func4(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func4C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 6) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 6, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 5 template static SQInteger Func5(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func5C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 7) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 7, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 6 template static SQInteger Func6(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func6C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 8) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 8, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 7 template static SQInteger Func7(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func7C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 9) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 9, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } // Arg Count 8 template static SQInteger Func8(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &); M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template static SQInteger Func8C(HSQUIRRELVM vm) { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && sq_gettop(vm) < 10) { return sq_throwerror(vm, _SC("wrong number of parameters")); } #endif typedef void (C::*M)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &) const; M* methodPtr; sq_getuserdata(vm, -1, (SQUserPointer*)&methodPtr, NULL); M method = *methodPtr; C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { assert(0); // may fail because C is not a type bound in the VM return sq_throwerror(vm, SQWHAT(vm)); } SQTRY() Var a1(vm, 2); Var a2(vm, 3); Var a3(vm, 4); Var a4(vm, 5); Var a5(vm, 6); Var a6(vm, 7); Var a7(vm, 8); Var a8(vm, 9); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } const StackStrF fmt(vm, 10, true); // Validate the format if (SQ_FAILED(fmt.mRes)) { return fmt.mRes; } (ptr->*method)( a1.value, a2.value, a3.value, a4.value, a5.value, a6.value, a7.value, a8.value, fmt ); SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } }; // // Formatted Member Function Resolvers // // Arg Count 0 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(const StackStrF &)) { return &SqMemberFmt::template Func0; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(const StackStrF &) const) { return &SqMemberFmt::template Func0C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(const StackStrF &)) { return &SqMemberFmt::template Func0; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(const StackStrF &) const) { return &SqMemberFmt::template Func0C; } // Arg Count 1 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, const StackStrF &)) { return &SqMemberFmt::template Func1; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, const StackStrF &) const) { return &SqMemberFmt::template Func1C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, const StackStrF &)) { return &SqMemberFmt::template Func1; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, const StackStrF &) const) { return &SqMemberFmt::template Func1C; } // Arg Count 2 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, const StackStrF &)) { return &SqMemberFmt::template Func2; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, const StackStrF &) const) { return &SqMemberFmt::template Func2C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, const StackStrF &)) { return &SqMemberFmt::template Func2; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, const StackStrF &) const) { return &SqMemberFmt::template Func2C; } // Arg Count 3 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, const StackStrF &)) { return &SqMemberFmt::template Func3; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, const StackStrF &) const) { return &SqMemberFmt::template Func3C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, const StackStrF &)) { return &SqMemberFmt::template Func3; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, const StackStrF &) const) { return &SqMemberFmt::template Func3C; } // Arg Count 4 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, const StackStrF &)) { return &SqMemberFmt::template Func4; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, const StackStrF &) const) { return &SqMemberFmt::template Func4C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, const StackStrF &)) { return &SqMemberFmt::template Func4; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, const StackStrF &) const) { return &SqMemberFmt::template Func4C; } // Arg Count 5 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, const StackStrF &)) { return &SqMemberFmt::template Func5; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, const StackStrF &) const) { return &SqMemberFmt::template Func5C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, const StackStrF &)) { return &SqMemberFmt::template Func5; } template inline SQFUNCTION SqMemberFuncFmt(R&(C::* /*method*/)(A1, A2, A3, A4, A5, const StackStrF &) const) { return &SqMemberFmt::template Func5C; } // Arg Count 6 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, const StackStrF &)) { return &SqMemberFmt::template Func6; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, const StackStrF &) const) { return &SqMemberFmt::template Func6C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, const StackStrF &)) { return &SqMemberFmt::template Func6; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, const StackStrF &) const) { return &SqMemberFmt::template Func6C; } // Arg Count 7 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &)) { return &SqMemberFmt::template Func7; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &) const) { return &SqMemberFmt::template Func7C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &)) { return &SqMemberFmt::template Func7; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, const StackStrF &) const) { return &SqMemberFmt::template Func7C; } // Arg Count 8 template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &)) { return &SqMemberFmt::template Func8; } template inline SQFUNCTION SqMemberFuncFmt(R (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &) const) { return &SqMemberFmt::template Func8C; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &)) { return &SqMemberFmt::template Func8; } template inline SQFUNCTION SqMemberFuncFmt(R& (C::* /*method*/)(A1, A2, A3, A4, A5, A6, A7, A8, const StackStrF &) const) { return &SqMemberFmt::template Func8C; } // // Variable Get // template inline SQInteger sqDefaultGet(HSQUIRRELVM vm) { C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } typedef V C::*M; M* memberPtr = NULL; sq_getuserdata(vm, -1, (SQUserPointer*)&memberPtr, NULL); // Get Member... M member = *memberPtr; PushVarR(vm, ptr->*member); return 1; } template inline SQInteger sqStaticGet(HSQUIRRELVM vm) { typedef V *M; M* memberPtr = NULL; sq_getuserdata(vm, -1, (SQUserPointer*)&memberPtr, NULL); // Get Member... M member = *memberPtr; PushVarR(vm, *member); return 1; } inline SQInteger sqVarGet(HSQUIRRELVM vm) { // Find the get method in the get table sq_push(vm, 2); #if !defined (SCRAT_NO_ERROR_CHECKING) if (SQ_FAILED(sq_rawget(vm, -2))) { #if (SQUIRREL_VERSION_NUMBER>= 200) && (SQUIRREL_VERSION_NUMBER < 300) // Squirrel 2.x return sq_throwerror(vm, _SC("member variable not found")); #else // Squirrel 3.x sq_pushnull(vm); return sq_throwobject(vm); #endif } #else sq_rawget(vm, -2); #endif // push 'this' sq_push(vm, 1); // Call the getter #if !defined (SCRAT_NO_ERROR_CHECKING) SQRESULT result = sq_call(vm, 1, true, ErrorHandling::IsEnabled()); if (SQ_FAILED(result)) { return sq_throwerror(vm, LastErrorString(vm).c_str()); } #else sq_call(vm, 1, true, ErrorHandling::IsEnabled()); #endif return 1; } // // Variable Set // template inline SQInteger sqDefaultSet(HSQUIRRELVM vm) { C* ptr; SQTRY() ptr = Var(vm, 1).value; SQCATCH_NOEXCEPT(vm) { SQCLEAR(vm); // clear the previous error return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } typedef V C::*M; M* memberPtr = NULL; sq_getuserdata(vm, -1, (SQUserPointer*)&memberPtr, NULL); // Get Member... M member = *memberPtr; SQTRY() if (is_pointer::value || is_reference::value) { ptr->*member = Var(vm, 2).value; } else { ptr->*member = Var(vm, 2).value; } SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } template inline SQInteger sqStaticSet(HSQUIRRELVM vm) { typedef V *M; M* memberPtr = NULL; sq_getuserdata(vm, -1, (SQUserPointer*)&memberPtr, NULL); // Get Member... M member = *memberPtr; SQTRY() if (is_pointer::value || is_reference::value) { *member = Var(vm, 2).value; } else { *member = Var(vm, 2).value; } SQCATCH_NOEXCEPT(vm) { return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm)); } SQCATCH(vm) { return sq_throwerror(vm, SQWHAT(vm)); } return 0; } inline SQInteger sqVarSet(HSQUIRRELVM vm) { // Find the set method in the set table sq_push(vm, 2); #if !defined (SCRAT_NO_ERROR_CHECKING) if (SQ_FAILED(sq_rawget(vm, -2))) { #if (SQUIRREL_VERSION_NUMBER>= 200) && (SQUIRREL_VERSION_NUMBER < 300) // Squirrel 2.x return sq_throwerror(vm, _SC("member variable not found")); #else // Squirrel 3.x sq_pushnull(vm); return sq_throwobject(vm); #endif } #else sq_rawget(vm, -2); #endif // push 'this' sq_push(vm, 1); sq_push(vm, 3); // Call the setter #if !defined (SCRAT_NO_ERROR_CHECKING) SQRESULT result = sq_call(vm, 2, false, ErrorHandling::IsEnabled()); if (SQ_FAILED(result)) { return sq_throwerror(vm, LastErrorString(vm).c_str()); } #else sq_call(vm, 2, false, ErrorHandling::IsEnabled()); #endif return 0; } /// @endcond } #endif