<<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T1,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T2<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>Duo <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:green;
mso-ansi-language:EN-US;mso-no-proof:yes">// type that represents unused type
parameters<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>NullT <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCallBase(<span
style='color:black'>lua_State *<span
style='color:black'>luaState, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>L = <span
style='color:black'>luaState;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_getglobal(<span
style='color:black'>L, <span
style='color:black'>functionName.<span
style='color:black'>c_str());<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">protected:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void push<span
style='color:fuchsia'>(const <span
style='color:blue'>int &<span
style='color:black'>value)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_pushinteger(<span
style='color:black'>L, <span
style='color:black'>value);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void push<span
style='color:fuchsia'>(const <span
style='color:blue'>float &<span
style='color:black'>value)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_pushnumber(<span
style='color:black'>L, <span
style='color:black'>value);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void push<span
style='color:fuchsia'>(const <span
style='color:blue'>double &<span
style='color:black'>value)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_pushnumber(<span
style='color:black'>L, <span
style='color:black'>value);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void push<span
style='color:fuchsia'>(const <span
style='color:black'>std::<span
style='color:black'>string &<span
style='color:black'>value)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_pushstring(<span
style='color:black'>L, <span
style='color:black'>value.<span
style='color:black'>c_str());<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void get<span
style='color:fuchsia'>(int <span
style='color:fuchsia'>&value<span
style='color:fuchsia'>) const<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>value = <span
style='color:black'>lua_tointeger(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void get<span
style='color:fuchsia'>(float <span
style='color:fuchsia'>&value<span
style='color:fuchsia'>) const<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>value = <span
style='color:black'>lua_tonumber(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void get<span
style='color:fuchsia'>(double <span
style='color:fuchsia'>&value<span
style='color:fuchsia'>) const<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>value = <span
style='color:black'>lua_tonumber(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void get<span
style='color:fuchsia'>(std<span
style='color:fuchsia'>::string <span
style='color:fuchsia'>&value<span
style='color:fuchsia'>) const <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">{<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> <span
style='mso-spacerun:yes'> value <span
style='color:fuchsia'>= (<span
style='color:blue'>char*)<span
style='color:black'>lua_tostring(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void get<span
style='color:fuchsia'>(NullT <span
style='color:fuchsia'>&value<span
style='color:fuchsia'>) const <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">protected:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>lua_State *<span
style='color:black'>L;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">template <<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename TR,<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T1 =
NullT,<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T2 =
NullT,<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T3 =
NullT,<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T4 =
NullT<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>Duo<<span
style='color:black'>TR, <span
style='color:blue'>typename LuaCall<span
style='color:fuchsia'><T1<span
style='color:fuchsia'>,T2<span
style='color:fuchsia'>,T3<span
style='color:fuchsia'>,T4<span
style='color:fuchsia'>,NullT<span
style='color:fuchsia'>> > <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>, public <span
style='color:black'>LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>TR call<span
style='color:fuchsia'>(T1 <span
style='color:black'>a1, <span
style='color:black'>T2 a2<span
style='color:fuchsia'>, T3 <span
style='color:black'>a3, <span
style='color:black'>T4 a4<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>TR returnValue<span
style='color:fuchsia'>;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a1);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a2);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a3);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a4);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>if(<span
style='color:black'>lua_pcall(<span
style='color:black'>L, <span
style='color:red'>4, <span
style='color:red'>1, <span
style='color:red'>0) <span
style='color:fuchsia'>!= 0<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>throw std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>(std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>(lua_tostring<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, -<span
style='color:red'>1)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>get(<span
style='color:black'>returnValue);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>return returnValue<span
style='color:fuchsia'>;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">template <<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename TR,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T1,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T2,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T3<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<<span
style='color:black'>TR,<span
style='color:black'>T1,<span
style='color:black'>T2,<span
style='color:black'>T3,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>Duo<<span
style='color:black'>TR,<span
style='color:black'>T1> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>, public <span
style='color:black'>LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> TR <span
style='color:black'>call(<span
style='color:black'>T1 a1<span
style='color:fuchsia'>, T2 <span
style='color:black'>a2, <span
style='color:black'>T3 a3<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">{<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> TR <span
style='color:black'>returnValue;<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> push(a1<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a2);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>push(<span
style='color:black'>a3);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:blue;mso-no-proof:yes'="">if<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">(lua_pcall(<span
style='font-size:10.0pt;font-family:"courier new";color:black;mso-no-proof:
yes'="">L, 3<span
style='color:fuchsia'>, 1<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>) != <span
style='color:red'>0)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:3'> throw <span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>lua_tostring(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">}<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> get<span
style='color:fuchsia'>(returnValue<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> return
returnValue;<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">};<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:green;mso-no-proof:
yes'=""><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">template <<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename TR,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T1,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T2<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<<span
style='color:black'>TR,<span
style='color:black'>T1,<span
style='color:black'>T2,<span
style='color:black'>NullT,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>Duo<<span
style='color:black'>TR,<span
style='color:black'>T1> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>, public <span
style='color:black'>LuaCallBase<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> {<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>TR call<span
style='color:fuchsia'>(T1 <span
style='color:black'>a1, <span
style='color:black'>T2 a2<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">{<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> TR <span
style='color:black'>returnValue;<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> push<span
style='color:fuchsia'>(a1<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> push<span
style='color:fuchsia'>(a2<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> if<span
style='color:fuchsia'>(lua_pcall<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, 2<span
style='color:fuchsia'>, 1<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>) != <span
style='color:red'>0)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:3'> throw <span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>lua_tostring(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>get(<span
style='color:black'>returnValue);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>return returnValue<span
style='color:fuchsia'>;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:green;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">template <<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename TR,
<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">typename T1<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<<span
style='color:black'>TR,<span
style='color:black'>T1,<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>Duo<<span
style='color:black'>TR,<span
style='color:black'>T1> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>, public <span
style='color:black'>LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> TR <span
style='color:black'>call(<span
style='color:black'>T1 a1<span
style='color:fuchsia'>)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> TR <span
style='color:black'>returnValue;<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> push<span
style='color:fuchsia'>(a1<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> if<span
style='color:fuchsia'>(lua_pcall<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, 1<span
style='color:fuchsia'>, 1<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>) != <span
style='color:red'>0)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:3'> throw <span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>lua_tostring(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">}<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> get<span
style='color:fuchsia'>(returnValue<span
style='color:fuchsia'>);<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> return
returnValue;<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">};<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:blue;mso-no-proof:yes'="">template<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""> <span
style='color:fuchsia'><typename <span
style='color:black'>TR><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<<span
style='color:black'>TR,<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>Duo<<span
style='color:black'>TR,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>, public <span
style='color:black'>LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'=""><o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> TR <span
style='color:black'>call(<span
style='color:blue'>void)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>TR returnValue<span
style='color:fuchsia'>;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:blue;mso-no-proof:yes'="">if<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">(lua_pcall(<span
style='font-size:10.0pt;font-family:"courier new";color:black;mso-no-proof:
yes'="">L, 0<span
style='color:fuchsia'>, 1<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>) != <span
style='color:red'>0)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> {<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:3'> throw <span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>std::<span
style='color:black'>string(<span
style='color:black'>lua_tostring(<span
style='color:black'>L, <span
style='color:fuchsia'>-1<span
style='color:fuchsia'>)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>get(<span
style='color:black'>returnValue);<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>return returnValue<span
style='color:fuchsia'>;<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">};<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">template <><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">class <span
style='color:black'>LuaCall<<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT,<span
style='color:black'>NullT> <o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: public <span
style='color:black'>LuaCallBase<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes">{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:blue;
mso-ansi-language:EN-US;mso-no-proof:yes">public:<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:black'>LuaCall(<span
style='color:black'>lua_State *<span
style='color:black'>L, <span
style='color:blue'>const std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>& functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>: LuaCallBase<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, functionName<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>{<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:fuchsia'>}<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";color:fuchsia;
mso-ansi-language:EN-US;mso-no-proof:yes"><o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>void call<span
style='color:fuchsia'>(void<span
style='color:fuchsia'>)<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">{<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> if<span
style='color:fuchsia'>(lua_pcall<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>, 0<span
style='color:fuchsia'>) != <span
style='color:red'>0)<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:2'> {<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='color:blue'>throw std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>(std<span
style='color:fuchsia'>::string<span
style='color:fuchsia'>(lua_tostring<span
style='color:fuchsia'>(L<span
style='color:fuchsia'>, -<span
style='color:red'>1)));<o:p>
<span
lang=en-us style="font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US;mso-no-proof:yes"> <span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">}<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";mso-no-proof:yes'=""><span
style='mso-tab-count:1'> }<o:p>
<span
style='font-size:10.0pt;font-family:"courier new";color:fuchsia;mso-no-proof:
yes'="">};<o:p>
Bibliography
Roberto Ierusalimschy
Programming in Lua – 2nd ed. (http://www.inf.puc-rio.br/~roberto/pil2/)
ISBN 85-903798-2-5
David Vandevoorde - Nicolai M. Josuttis
C++ Templates - The Complete Guide
ISBN 0-201-73484-2
The Web Links listed here may not be valid in the future.