Exemplo n.º 1
0
    static int GetValue_Float(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                AL.IniFile obj  = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
                string     arg0 = ToLua.CheckString(L, 2);
                float      o    = obj.GetValue_Float(arg0);
                LuaDLL.lua_pushnumber(L, o);
                return(1);
            }
            else if (count == 3)
            {
                AL.IniFile obj  = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
                string     arg0 = ToLua.CheckString(L, 2);
                float      arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                float      o    = obj.GetValue_Float(arg0, arg1);
                LuaDLL.lua_pushnumber(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: AL.IniFile.GetValue_Float"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         AL.IniFile obj = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 3
0
 static int Read_From_String(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         AL.IniFile obj  = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
         string     arg0 = ToLua.CheckString(L, 2);
         obj.Read_From_String(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 4
0
 static int ToString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         AL.IniFile obj = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
         string     o   = obj.ToString();
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 5
0
 static int SetFloat(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         AL.IniFile obj  = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
         string     arg0 = ToLua.CheckString(L, 2);
         float      arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         obj.SetFloat(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 6
0
 static int IsContainsName(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         AL.IniFile obj  = (AL.IniFile)ToLua.CheckObject <AL.IniFile>(L, 1);
         string     arg0 = ToLua.CheckString(L, 2);
         bool       o    = obj.IsContainsName(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 7
0
    static int _CreateAL_IniFile(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                AL.IniFile obj = new AL.IniFile();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 1 && TypeChecker.CheckTypes <bool>(L, 1))
            {
                bool       arg0 = LuaDLL.lua_toboolean(L, 1);
                AL.IniFile obj  = new AL.IniFile(arg0);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 1 && TypeChecker.CheckTypes <string>(L, 1))
            {
                string     arg0 = ToLua.ToString(L, 1);
                AL.IniFile obj  = new AL.IniFile(arg0);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 2)
            {
                string     arg0 = ToLua.CheckString(L, 1);
                bool       arg1 = LuaDLL.luaL_checkboolean(L, 2);
                AL.IniFile obj  = new AL.IniFile(arg0, arg1);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: AL.IniFile.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }