Esempio n. 1
0
    static int get_IsInitialized(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)o;
            bool ret = obj.IsInitialized;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index IsInitialized on a nil value"));
        }
    }
Esempio n. 2
0
    static int MergeFrom(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <Google.ProtocolBuffers.IMessageLite>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                Google.ProtocolBuffers.IMessageLite arg0 = (Google.ProtocolBuffers.IMessageLite)ToLua.ToObject(L, 2);
                MyLib.GCPlayerCmd.Builder           o    = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <MyLib.GCPlayerCmd>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                MyLib.GCPlayerCmd         arg0 = (MyLib.GCPlayerCmd)ToLua.ToObject(L, 2);
                MyLib.GCPlayerCmd.Builder o    = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <Google.ProtocolBuffers.CodedInputStream>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                Google.ProtocolBuffers.CodedInputStream arg0 = (Google.ProtocolBuffers.CodedInputStream)ToLua.ToObject(L, 2);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <Google.ProtocolBuffers.ByteString>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                Google.ProtocolBuffers.ByteString arg0 = (Google.ProtocolBuffers.ByteString)ToLua.ToObject(L, 2);
                MyLib.GCPlayerCmd.Builder         o    = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <byte[]>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <System.IO.Stream>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                System.IO.Stream          arg0 = (System.IO.Stream)ToLua.ToObject(L, 2);
                MyLib.GCPlayerCmd.Builder o    = obj.MergeFrom(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <Google.ProtocolBuffers.CodedInputStream, Google.ProtocolBuffers.ExtensionRegistry>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                Google.ProtocolBuffers.CodedInputStream  arg0 = (Google.ProtocolBuffers.CodedInputStream)ToLua.ToObject(L, 2);
                Google.ProtocolBuffers.ExtensionRegistry arg1 = (Google.ProtocolBuffers.ExtensionRegistry)ToLua.ToObject(L, 3);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <Google.ProtocolBuffers.ByteString, Google.ProtocolBuffers.ExtensionRegistry>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                Google.ProtocolBuffers.ByteString        arg0 = (Google.ProtocolBuffers.ByteString)ToLua.ToObject(L, 2);
                Google.ProtocolBuffers.ExtensionRegistry arg1 = (Google.ProtocolBuffers.ExtensionRegistry)ToLua.ToObject(L, 3);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <byte[], Google.ProtocolBuffers.ExtensionRegistry>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
                Google.ProtocolBuffers.ExtensionRegistry arg1 = (Google.ProtocolBuffers.ExtensionRegistry)ToLua.ToObject(L, 3);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <System.IO.Stream, Google.ProtocolBuffers.ExtensionRegistry>(L, 2))
            {
                Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
                System.IO.Stream arg0 = (System.IO.Stream)ToLua.ToObject(L, 2);
                Google.ProtocolBuffers.ExtensionRegistry arg1 = (Google.ProtocolBuffers.ExtensionRegistry)ToLua.ToObject(L, 3);
                MyLib.GCPlayerCmd.Builder o = obj.MergeFrom(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Google.ProtocolBuffers.GeneratedBuilderLite<MyLib.GCPlayerCmd,MyLib.GCPlayerCmd.Builder>.MergeFrom"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Esempio n. 3
0
 static int Build(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> obj = (Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder>)ToLua.CheckObject <Google.ProtocolBuffers.GeneratedBuilderLite <MyLib.GCPlayerCmd, MyLib.GCPlayerCmd.Builder> >(L, 1);
         MyLib.GCPlayerCmd o = obj.Build();
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }