| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
- public class SBoolWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(SBool), null, "SBool");
- L.RegFunction("Encrypt", Encrypt);
- L.RegFunction("Decrypt", Decrypt);
- L.RegFunction("Equals", Equals);
- L.RegFunction("GetHashCode", GetHashCode);
- L.RegFunction("ToString", ToString);
- L.RegFunction("New", _CreateSBool);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.EndClass();
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateSBool(IntPtr L)
- {
- SBool obj = new SBool();
- ToLua.PushValue(L, obj);
- return 1;
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Encrypt(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- bool arg0 = LuaDLL.luaL_checkboolean(L, 1);
- int arg1;
- int o = SBool.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);
- bool o = SBool.Decrypt(arg0, arg1);
- LuaDLL.lua_pushboolean(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<SBool>(L, 2))
- {
- SBool obj = (SBool)ToLua.CheckObject(L, 1, typeof(SBool));
- SBool arg0 = StackTraits<SBool>.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<object>(L, 2))
- {
- SBool obj = (SBool)ToLua.CheckObject(L, 1, typeof(SBool));
- 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: SBool.Equals");
- }
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetHashCode(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- SBool obj = (SBool)ToLua.CheckObject(L, 1, typeof(SBool));
- 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
- {
- ToLua.CheckArgsCount(L, 1);
- SBool obj = (SBool)ToLua.CheckObject(L, 1, typeof(SBool));
- string o = obj.ToString();
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- }
|