Example #1
0
        public ObjectTranslator(LuaInterface interpreter, SharpLua.Lua.LuaState luaState)
        {
            this.interpreter = interpreter;
            typeChecker      = new CheckType(this);
            metaFunctions    = new MetaFunctions(this);

            importTypeFunction        = new SharpLua.Lua.lua_CFunction(this.importType);
            loadAssemblyFunction      = new SharpLua.Lua.lua_CFunction(this.loadAssembly);
            registerTableFunction     = new SharpLua.Lua.lua_CFunction(this.registerTable);
            unregisterTableFunction   = new SharpLua.Lua.lua_CFunction(this.unregisterTable);
            getMethodSigFunction      = new SharpLua.Lua.lua_CFunction(this.getMethodSignature);
            getConstructorSigFunction = new SharpLua.Lua.lua_CFunction(this.getConstructorSignature);

            ctypeFunction       = new SharpLua.Lua.lua_CFunction(this.ctype);
            enumFromIntFunction = new SharpLua.Lua.lua_CFunction(this.enumFromInt);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }
Example #2
0
        public ObjectTranslator(LuaInterface interpreter, SharpLua.Lua.LuaState luaState)
        {
            this.interpreter = interpreter;
            typeChecker = new CheckType(this);
            metaFunctions = new MetaFunctions(this);

            importTypeFunction = new SharpLua.Lua.lua_CFunction(this.importType);
            loadAssemblyFunction = new SharpLua.Lua.lua_CFunction(this.loadAssembly);
            registerTableFunction = new SharpLua.Lua.lua_CFunction(this.registerTable);
            unregisterTableFunction = new SharpLua.Lua.lua_CFunction(this.unregisterTable);
            getMethodSigFunction = new SharpLua.Lua.lua_CFunction(this.getMethodSignature);
            getConstructorSigFunction = new SharpLua.Lua.lua_CFunction(this.getConstructorSignature);

            ctypeFunction = new SharpLua.Lua.lua_CFunction(this.ctype);
            enumFromIntFunction = new SharpLua.Lua.lua_CFunction(this.enumFromInt);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }