//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class System_Int32Wrap { public static void Register(LuaState L) { L.BeginClass(typeof(System.Int32), null); L.RegFunction("CompareTo", CompareTo); L.RegFunction("Equals", Equals); L.RegFunction("GetHashCode", GetHashCode); L.RegFunction("ToString", ToString); L.RegFunction("Parse", Parse); L.RegFunction("TryParse", TryParse); L.RegFunction("GetTypeCode", GetTypeCode); L.RegFunction("New", _CreateSystem_Int32); L.RegFunction("__tostring", ToLua.op_ToString); L.RegConstant("MaxValue", 2147483647); L.RegConstant("MinValue", -2147483648); L.EndClass(); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _CreateSystem_Int32(IntPtr L) { System.Int32 obj = new System.Int32(); LuaDLL.lua_pushinteger(L, obj); return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int CompareTo(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 2)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); int arg0 = (int)LuaDLL.lua_tonumber(L, 2); int o = obj.CompareTo(arg0); LuaDLL.lua_pushinteger(L, o); ToLua.SetBack(L, 1, obj); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); object arg0 = ToLua.ToVarObject(L, 2); int o = obj.CompareTo(arg0); LuaDLL.lua_pushinteger(L, o); ToLua.SetBack(L, 1, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int32.CompareTo"); } } 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)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); int arg0 = (int)LuaDLL.lua_tonumber(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)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); 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: System.Int32.Equals"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetHashCode(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); 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) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); string o = obj.ToString(); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); 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)) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); 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) { System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); 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: System.Int32.ToString"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Parse(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { string arg0 = ToLua.CheckString(L, 1); int o = System.Int32.Parse(arg0); LuaDLL.lua_pushinteger(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { string arg0 = ToLua.CheckString(L, 1); System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.ToObject(L, 2); int o = System.Int32.Parse(arg0, arg1); LuaDLL.lua_pushinteger(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 2)) { string arg0 = ToLua.CheckString(L, 1); System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 2); int o = System.Int32.Parse(arg0, arg1); LuaDLL.lua_pushinteger(L, o); return 1; } else if (count == 3) { string arg0 = ToLua.CheckString(L, 1); System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.CheckObject(L, 2, typeof(System.Globalization.NumberStyles)); System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.CheckObject(L, 3); int o = System.Int32.Parse(arg0, arg1, arg2); LuaDLL.lua_pushinteger(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int32.Parse"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int TryParse(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { string arg0 = ToLua.CheckString(L, 1); int arg1; bool o = System.Int32.TryParse(arg0, out arg1); LuaDLL.lua_pushboolean(L, o); LuaDLL.lua_pushinteger(L, arg1); return 2; } else if (count == 4) { string arg0 = ToLua.CheckString(L, 1); System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.CheckObject(L, 2, typeof(System.Globalization.NumberStyles)); System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.CheckObject(L, 3); int arg3; bool o = System.Int32.TryParse(arg0, arg1, arg2, out arg3); LuaDLL.lua_pushboolean(L, o); LuaDLL.lua_pushinteger(L, arg3); return 2; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int32.TryParse"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetTypeCode(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); System.Int32 obj = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32)); System.TypeCode o = obj.GetTypeCode(); ToLua.Push(L, o); ToLua.SetBack(L, 1, obj); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } }