예제 #1
0
        static int _m_GetMethodWrap(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                XLua.MethodWrapsCache gen_to_be_invoked = (XLua.MethodWrapsCache)translator.FastGetCSObj(L, 1);



                {
                    System.Type _type       = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    string      _methodName = LuaAPI.lua_tostring(L, 3);

                    XLua.LuaDLL.lua_CSFunction gen_ret = gen_to_be_invoked.GetMethodWrap(_type, _methodName);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #2
0
        static int _m_BeginClassRegister_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type   _type = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    System.IntPtr _L    = LuaAPI.lua_touserdata(L, 2);
                    XLua.LuaDLL.lua_CSFunction _creator = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 3);
                    int _class_field_count   = LuaAPI.xlua_tointeger(L, 4);
                    int _static_getter_count = LuaAPI.xlua_tointeger(L, 5);
                    int _static_setter_count = LuaAPI.xlua_tointeger(L, 6);

                    XLua.Utils.BeginClassRegister(_type, _L, _creator, _class_field_count, _static_getter_count, _static_setter_count);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #3
0
        static int _m_EndObjectRegister_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type                _type            = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    System.IntPtr              _L               = LuaAPI.lua_touserdata(L, 2);
                    XLua.ObjectTranslator      _translator      = (XLua.ObjectTranslator)translator.GetObject(L, 3, typeof(XLua.ObjectTranslator));
                    XLua.LuaDLL.lua_CSFunction _csIndexer       = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 4);
                    XLua.LuaDLL.lua_CSFunction _csNewIndexer    = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 5);
                    System.Type                _base_type       = (System.Type)translator.GetObject(L, 6, typeof(System.Type));
                    XLua.LuaDLL.lua_CSFunction _arrayIndexer    = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 7);
                    XLua.LuaDLL.lua_CSFunction _arrayNewIndexer = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 8);

                    XLua.Utils.EndObjectRegister(_type, _L, _translator, _csIndexer, _csNewIndexer, _base_type, _arrayIndexer, _arrayNewIndexer);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #4
0
        public static void lua_pushstdcallcfunction(IntPtr L, LuaCSFunction fun)
        {
#if XLUA
            LuaDLL.lua_pushstdcallcfunction(L, fun);
#elif TOLUA
            LuaDLL.tolua_pushcfunction(L, fun);
#elif SLUA
            LuaDLL.lua_pushcfunction(L, fun);
#endif
        }
예제 #5
0
            public static void AddSearcher(LuaEnv env, LuaCSFunction searcher, int index)
            {
                bool isDeep = LuaDeepProfilerSetting.Instance.isDeepProfiler;

                if (isDeep)
                {
                    env.AddLoader(CustomLoader);
                }
                ProxySearcher(env, searcher, index);
            }
예제 #6
0
        static int _m_IsStaticPInvokeCSFunction_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    XLua.LuaDLL.lua_CSFunction _csFunction = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 1);

                    bool gen_ret = XLua.Utils.IsStaticPInvokeCSFunction(_csFunction);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #7
0
        static int _m_RegisterFunc_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.IntPtr _L    = LuaAPI.lua_touserdata(L, 1);
                    int           _idx  = LuaAPI.xlua_tointeger(L, 2);
                    string        _name = LuaAPI.lua_tostring(L, 3);
                    XLua.LuaDLL.lua_CSFunction _func = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 4);

                    XLua.Utils.RegisterFunc(_L, _idx, _name, _func);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #8
0
        static int _m_AddBuildin(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                XLua.LuaEnv gen_to_be_invoked = (XLua.LuaEnv)translator.FastGetCSObj(L, 1);



                {
                    string _name = LuaAPI.lua_tostring(L, 2);
                    XLua.LuaDLL.lua_CSFunction _initer = translator.GetDelegate <XLua.LuaDLL.lua_CSFunction>(L, 3);

                    gen_to_be_invoked.AddBuildin(_name, _initer);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #9
0
 public static void ProxySearcher(LuaEnv env, LuaCSFunction searcher, int index)
 {
 }