//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class SIntWrap { public static void Register(LuaState L) { L.BeginClass(typeof(SInt), null, "SInt"); L.RegFunction("Convert", Convert); L.RegFunction("InvConvert", InvConvert); L.RegFunction("Encrypt", Encrypt); L.RegFunction("Decrypt", Decrypt); L.RegFunction("Equals", Equals); L.RegFunction("GetHashCode", GetHashCode); L.RegFunction("ToString", ToString); L.RegFunction("New", _CreateSInt); L.RegFunction("__tostring", ToLua.op_ToString); L.EndClass(); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _CreateSInt(IntPtr L) { SInt obj = new SInt(); ToLua.PushValue(L, obj); return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Convert(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); SInt o = SInt.Convert(arg0); ToLua.PushValue(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int InvConvert(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); SInt arg0 = StackTraits.Check(L, 1); int o = SInt.InvConvert(arg0); LuaDLL.lua_pushinteger(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Encrypt(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); int arg1; int o = SInt.Encrypt(arg0, out arg1); LuaDLL.lua_pushinteger(L, o); LuaDLL.lua_pushinteger(L, arg1); return 2; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Decrypt(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); int arg1 = (int)LuaDLL.luaL_checknumber(L, 2); int o = SInt.Decrypt(arg0, arg1); LuaDLL.lua_pushinteger(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Equals(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 2)) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); SInt arg0 = StackTraits.To(L, 2); bool o = obj.Equals(arg0); LuaDLL.lua_pushboolean(L, o); ToLua.SetBack(L, 1, obj); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); object arg0 = ToLua.ToVarObject(L, 2); bool o = obj.Equals(arg0); LuaDLL.lua_pushboolean(L, o); ToLua.SetBack(L, 1, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: SInt.Equals"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetHashCode(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); int o = obj.GetHashCode(); LuaDLL.lua_pushinteger(L, o); ToLua.SetBack(L, 1, obj); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int ToString(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); string o = obj.ToString(); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); string arg0 = ToLua.ToString(L, 2); string o = obj.ToString(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); System.IFormatProvider arg0 = (System.IFormatProvider)ToLua.ToObject(L, 2); string o = obj.ToString(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 3) { SInt obj = (SInt)ToLua.CheckObject(L, 1, typeof(SInt)); string arg0 = ToLua.CheckString(L, 2); System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.CheckObject(L, 3); string o = obj.ToString(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: SInt.ToString"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } }