static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         GameFramework.AttrCalc.AttrExpressionList o;
         if (argc == 1)
         {
             o = new GameFramework.AttrCalc.AttrExpressionList();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 2)
         {
             System.Collections.Generic.IEnumerable <GameFramework.AttrCalc.IAttrExpression> a1;
             checkType(l, 2, out a1);
             o = new GameFramework.AttrCalc.AttrExpressionList(a1);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Reverse(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             self.Reverse();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 3)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.Reverse(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_Count(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.Count);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int TrimExcess(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         self.TrimExcess();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int AsReadOnly(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         var ret = self.AsReadOnly();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Sort(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             self.Sort();
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(System.Comparison <GameFramework.AttrCalc.IAttrExpression>)))
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             System.Comparison <GameFramework.AttrCalc.IAttrExpression> a1;
             LuaDelegation.checkDelegate(l, 2, out a1);
             self.Sort(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(IComparer <GameFramework.AttrCalc.IAttrExpression>)))
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             System.Collections.Generic.IComparer <GameFramework.AttrCalc.IAttrExpression> a1;
             checkType(l, 2, out a1);
             self.Sort(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Collections.Generic.IComparer <GameFramework.AttrCalc.IAttrExpression> a3;
             checkType(l, 4, out a3);
             self.Sort(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int RemoveAt(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         self.RemoveAt(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int AddRange(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         System.Collections.Generic.IEnumerable <GameFramework.AttrCalc.IAttrExpression> a1;
         checkType(l, 2, out a1);
         self.AddRange(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Add(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         GameFramework.AttrCalc.IAttrExpression    a1;
         checkType(l, 2, out a1);
         self.Add(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int ForEach(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         System.Action <GameFramework.AttrCalc.IAttrExpression> a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         self.ForEach(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_Capacity(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.Capacity = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int BinarySearch(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             GameFramework.AttrCalc.IAttrExpression    a1;
             checkType(l, 2, out a1);
             var ret = self.BinarySearch(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             GameFramework.AttrCalc.IAttrExpression    a1;
             checkType(l, 2, out a1);
             System.Collections.Generic.IComparer <GameFramework.AttrCalc.IAttrExpression> a2;
             checkType(l, 3, out a2);
             var ret = self.BinarySearch(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 5)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             GameFramework.AttrCalc.IAttrExpression a3;
             checkType(l, 4, out a3);
             System.Collections.Generic.IComparer <GameFramework.AttrCalc.IAttrExpression> a4;
             checkType(l, 5, out a4);
             var ret = self.BinarySearch(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int getItem(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         var ret = self[v];
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int TrueForAll(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         System.Predicate <GameFramework.AttrCalc.IAttrExpression> a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         var ret = self.TrueForAll(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int LastIndexOf(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             GameFramework.AttrCalc.IAttrExpression    a1;
             checkType(l, 2, out a1);
             var ret = self.LastIndexOf(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             GameFramework.AttrCalc.IAttrExpression    a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             var ret = self.LastIndexOf(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 4)
         {
             GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
             GameFramework.AttrCalc.IAttrExpression    a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             var ret = self.LastIndexOf(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int setItem(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         GameFramework.AttrCalc.IAttrExpression c;
         checkType(l, 3, out c);
         self[v] = c;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GetRange(IntPtr l)
 {
     try {
         GameFramework.AttrCalc.AttrExpressionList self = (GameFramework.AttrCalc.AttrExpressionList)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         var ret = self.GetRange(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Esempio n. 18
0
    public bool LoadExpressions(GameFramework.AttrCalc.AttrExpressionList exps)
    {
        var err = LuaFunctionHelper.BeginCall(m_Cs2Lua_LoadExpressions);

        LuaFunctionHelper.PushValue(Self);
        LuaFunctionHelper.PushValue(exps);
        var end_call_res = LuaFunctionHelper.EndCall(err);

        if (end_call_res)
        {
            LuaFunctionHelper.BeginGetResult(err);
            bool __cs2lua_ret;
            LuaFunctionHelper.GetResult(out __cs2lua_ret);
            LuaFunctionHelper.EndGetResult();
            return(__cs2lua_ret);
        }
        else
        {
            return(false);
        }
    }
    public bool LoadExpressions(GameFramework.AttrCalc.AttrExpressionList exps)
    {
        var __cs2lua_ret = base.CallFunction(m_Cs2Lua_LoadExpressions, false, Self, exps);

        return(base.CastTo <bool>(__cs2lua_ret));
    }