From 228dd61995a404b6c59832bf8b0f8375374c8acc Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 20 Aug 2014 16:01:30 +0200 Subject: Added HOOK_SERVER_PING --- src/Bindings/LuaState_Call.inc | 847 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 847 insertions(+) create mode 100644 src/Bindings/LuaState_Call.inc (limited to 'src/Bindings/LuaState_Call.inc') diff --git a/src/Bindings/LuaState_Call.inc b/src/Bindings/LuaState_Call.inc new file mode 100644 index 000000000..810b0551b --- /dev/null +++ b/src/Bindings/LuaState_Call.inc @@ -0,0 +1,847 @@ +// LuaState_Call.inc + +// This file is auto-generated by gen_LuaState_Call.lua +// Make changes to the generator instead of to this file! + +// This file contains the various overloads for the cLuaState::Call() function +// Each overload handles a different number of parameters / return values + + + + + +/** Call the specified 0-param 0-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function) +{ + if (!PushFunction(a_Function)) + { + return false; + } + if (!CallFunction(0)) + { + return false; + } + return true; +} + + + + + +/** Call the specified 1-param 0-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1) +{ + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + if (!CallFunction(0)) + { + return false; + } + return true; +} + + + + + +/** Call the specified 2-param 0-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2) +{ + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + if (!CallFunction(0)) + { + return false; + } + return true; +} + + + + + +/** Call the specified 3-param 0-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3) +{ + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + if (!CallFunction(0)) + { + return false; + } + return true; +} + + + + + +/** Call the specified 4-param 0-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4) +{ + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + if (!CallFunction(0)) + { + return false; + } + return true; +} + + + + + +/** Call the specified 0-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 1-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 2-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 3-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 4-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 5-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 6-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 7-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 8-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 9-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, ParamT9 a_Param9, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + Push(a_Param9); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 10-param 1-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, ParamT9 a_Param9, ParamT10 a_Param10, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + Push(a_Param9); + Push(a_Param10); + if (!CallFunction(1)) + { + return false; + } + GetStackValue(-1, a_Ret1); + lua_pop(m_LuaState, 1); + return true; +} + + + + + +/** Call the specified 0-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 1-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 2-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 3-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 4-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 5-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 6-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 7-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 8-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 9-param 2-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, ParamT9 a_Param9, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + Push(a_Param9); + if (!CallFunction(2)) + { + return false; + } + GetStackValue(-2, a_Ret1); + GetStackValue(-1, a_Ret2); + lua_pop(m_LuaState, 2); + return true; +} + + + + + +/** Call the specified 7-param 3-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2, RetT3 & a_Ret3) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + if (!CallFunction(3)) + { + return false; + } + GetStackValue(-3, a_Ret1); + GetStackValue(-2, a_Ret2); + GetStackValue(-1, a_Ret3); + lua_pop(m_LuaState, 3); + return true; +} + + + + + +/** Call the specified 8-param 3-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2, RetT3 & a_Ret3) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + if (!CallFunction(3)) + { + return false; + } + GetStackValue(-3, a_Ret1); + GetStackValue(-2, a_Ret2); + GetStackValue(-1, a_Ret3); + lua_pop(m_LuaState, 3); + return true; +} + + + + + +/** Call the specified 4-param 5-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2, RetT3 & a_Ret3, RetT4 & a_Ret4, RetT5 & a_Ret5) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + if (!CallFunction(5)) + { + return false; + } + GetStackValue(-5, a_Ret1); + GetStackValue(-4, a_Ret2); + GetStackValue(-3, a_Ret3); + GetStackValue(-2, a_Ret4); + GetStackValue(-1, a_Ret5); + lua_pop(m_LuaState, 5); + return true; +} + + + + + +/** Call the specified 9-param 5-return Lua function: +Returns true if call succeeded, false if there was an error. */ +template +bool Call(FnT a_Function, ParamT1 a_Param1, ParamT2 a_Param2, ParamT3 a_Param3, ParamT4 a_Param4, ParamT5 a_Param5, ParamT6 a_Param6, ParamT7 a_Param7, ParamT8 a_Param8, ParamT9 a_Param9, const cLuaState::cRet & a_RetMark, RetT1 & a_Ret1, RetT2 & a_Ret2, RetT3 & a_Ret3, RetT4 & a_Ret4, RetT5 & a_Ret5) +{ + UNUSED(a_RetMark); + if (!PushFunction(a_Function)) + { + return false; + } + Push(a_Param1); + Push(a_Param2); + Push(a_Param3); + Push(a_Param4); + Push(a_Param5); + Push(a_Param6); + Push(a_Param7); + Push(a_Param8); + Push(a_Param9); + if (!CallFunction(5)) + { + return false; + } + GetStackValue(-5, a_Ret1); + GetStackValue(-4, a_Ret2); + GetStackValue(-3, a_Ret3); + GetStackValue(-2, a_Ret4); + GetStackValue(-1, a_Ret5); + lua_pop(m_LuaState, 5); + return true; +} + + + + + -- cgit v1.2.3