示例#1
0
 static public int constructor(IntPtr l)
 {
     try {
         int      argc = LuaDLL.lua_gettop(l);
         ObjQueue o;
         if (argc == 1)
         {
             o = new ObjQueue();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 2)
         {
             System.Collections.Generic.IEnumerable <System.Object> a1;
             checkType(l, 2, out a1);
             o = new ObjQueue(a1);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#2
0
 static public int Clear(IntPtr l)
 {
     try {
         ObjQueue self = (ObjQueue)checkSelf(l);
         self.Clear();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#3
0
 static public int get_Count(IntPtr l)
 {
     try {
         ObjQueue self = (ObjQueue)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.Count);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#4
0
 static public int Peek(IntPtr l)
 {
     try {
         ObjQueue self = (ObjQueue)checkSelf(l);
         var      ret  = self.Peek();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#5
0
 static public int Enqueue(IntPtr l)
 {
     try {
         ObjQueue      self = (ObjQueue)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         self.Enqueue(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#6
0
 static public int Contains(IntPtr l)
 {
     try {
         ObjQueue      self = (ObjQueue)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         var ret = self.Contains(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }