public void Clear(){
			
			First=null;
			Last=null;
			Length=0;
			
		}
示例#2
0
        public void Push(float value)
        {
            // Create the entry:
            CffStackEntry entry = new CffStackEntry(value);

            Length++;

            if (First == null)
            {
                First = Last = entry;
            }
            else
            {
                entry.Previous = Last;
                Last           = Last.Next = entry;
            }
        }
		public void Push(float value){
			
			// Create the entry:
			CffStackEntry entry=new CffStackEntry(value);
			
			Length++;
			
			if(First==null){
				
				First=Last=entry;
				
			}else{
				
				entry.Previous=Last;
				Last=Last.Next=entry;
				
			}
			
		}
		public float Shift(){
			
			// Remove first one:
			CffStackEntry toRemove=First;
			
			// Update first:
			First=toRemove.Next;
			
			if(First==null){
				
				Last=null;
				Length=0;
				
			}else{
				First.Previous=null;
			
				Length--;
			}
			
			return toRemove.Value;
			
		}
示例#5
0
        public float Pop()
        {
            // Remove last one:
            CffStackEntry toPop = Last;

            // Update last:
            Last = toPop.Previous;

            if (Last == null)
            {
                First  = null;
                Length = 0;
            }
            else
            {
                Last.Next = null;

                Length--;
            }

            return(toPop.Value);
        }
示例#6
0
        public float Shift()
        {
            // Remove first one:
            CffStackEntry toRemove = First;

            // Update first:
            First = toRemove.Next;

            if (First == null)
            {
                Last   = null;
                Length = 0;
            }
            else
            {
                First.Previous = null;

                Length--;
            }

            return(toRemove.Value);
        }
		public float Pop(){
			
			// Remove last one:
			CffStackEntry toPop=Last;
			
			// Update last:
			Last=toPop.Previous;
			
			if(Last==null){
				
				First=null;
				Length=0;
				
			}else{
				Last.Next=null;
				
				Length--;
			}
			
			return toPop.Value;
			
		}
示例#8
0
 public void Clear()
 {
     First  = null;
     Last   = null;
     Length = 0;
 }