summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState_Call.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/LuaState_Call.inc')
-rw-r--r--src/Bindings/LuaState_Call.inc847
1 files changed, 847 insertions, 0 deletions
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 <typename FnT>
+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 <typename FnT, typename ParamT1>
+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 <typename FnT, typename ParamT1, typename ParamT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4>
+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 <typename FnT, typename RetT1>
+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 <typename FnT, typename ParamT1, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename ParamT9, typename RetT1>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename ParamT9, typename ParamT10, typename RetT1>
+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 <typename FnT, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename ParamT9, typename RetT1, typename RetT2>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename RetT1, typename RetT2, typename RetT3>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename RetT1, typename RetT2, typename RetT3>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename RetT1, typename RetT2, typename RetT3, typename RetT4, typename RetT5>
+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 <typename FnT, typename ParamT1, typename ParamT2, typename ParamT3, typename ParamT4, typename ParamT5, typename ParamT6, typename ParamT7, typename ParamT8, typename ParamT9, typename RetT1, typename RetT2, typename RetT3, typename RetT4, typename RetT5>
+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;
+}
+
+
+
+
+