コード例 #1
0
ファイル: BlockObjQueue.cs プロジェクト: TetradogOther/NGit
 internal BlockObjQueue.Block NewBlock()
 {
     BlockObjQueue.Block b = next;
     if (b == null)
     {
         return(new BlockObjQueue.Block());
     }
     next = b.next;
     b.Clear();
     return(b);
 }
コード例 #2
0
ファイル: BlockObjQueue.cs プロジェクト: TetradogOther/NGit
        internal virtual RevObject Next()
        {
            BlockObjQueue.Block b = head;
            if (b == null)
            {
                return(null);
            }
            RevObject c = b.Pop();

            if (b.IsEmpty())
            {
                head = b.next;
                if (head == null)
                {
                    tail = null;
                }
                free.FreeBlock(b);
            }
            return(c);
        }
コード例 #3
0
ファイル: BlockObjQueue.cs プロジェクト: LunarLanding/ngit
		internal virtual void Add(RevObject c)
		{
			BlockObjQueue.Block b = tail;
			if (b == null)
			{
				b = free.NewBlock();
				b.Add(c);
				head = b;
				tail = b;
				return;
			}
			else
			{
				if (b.IsFull())
				{
					b = free.NewBlock();
					tail.next = b;
					tail = b;
				}
			}
			b.Add(c);
		}
コード例 #4
0
ファイル: BlockObjQueue.cs プロジェクト: TetradogOther/NGit
 internal virtual void Add(RevObject c)
 {
     BlockObjQueue.Block b = tail;
     if (b == null)
     {
         b = free.NewBlock();
         b.Add(c);
         head = b;
         tail = b;
         return;
     }
     else
     {
         if (b.IsFull())
         {
             b         = free.NewBlock();
             tail.next = b;
             tail      = b;
         }
     }
     b.Add(c);
 }
コード例 #5
0
ファイル: BlockObjQueue.cs プロジェクト: LunarLanding/ngit
		internal virtual RevObject Next()
		{
			BlockObjQueue.Block b = head;
			if (b == null)
			{
				return null;
			}
			RevObject c = b.Pop();
			if (b.IsEmpty())
			{
				head = b.next;
				if (head == null)
				{
					tail = null;
				}
				free.FreeBlock(b);
			}
			return c;
		}
コード例 #6
0
ファイル: BlockObjQueue.cs プロジェクト: LunarLanding/ngit
			internal void Clear()
			{
				next = null;
				headIndex = 0;
				tailIndex = 0;
			}
コード例 #7
0
ファイル: BlockObjQueue.cs プロジェクト: LunarLanding/ngit
			internal void FreeBlock(BlockObjQueue.Block b)
			{
				b.next = next;
				next = b;
			}
コード例 #8
0
ファイル: BlockObjQueue.cs プロジェクト: LunarLanding/ngit
			internal BlockObjQueue.Block NewBlock()
			{
				BlockObjQueue.Block b = next;
				if (b == null)
				{
					return new BlockObjQueue.Block();
				}
				next = b.next;
				b.Clear();
				return b;
			}
コード例 #9
0
ファイル: BlockObjQueue.cs プロジェクト: TetradogOther/NGit
 internal void Clear()
 {
     next      = null;
     headIndex = 0;
     tailIndex = 0;
 }
コード例 #10
0
ファイル: BlockObjQueue.cs プロジェクト: TetradogOther/NGit
 internal void FreeBlock(BlockObjQueue.Block b)
 {
     b.next = next;
     next   = b;
 }