bintools/rcomp/src/STACK.CPP
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 /*
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "STACK.H"
       
    20 
       
    21 StackItem::StackItem()
       
    22 	{}
       
    23 
       
    24 StackItem::~StackItem()
       
    25 	{}
       
    26 
       
    27 Stack::Stack()
       
    28 	{}
       
    29 	
       
    30 StackItem * Stack::Pop()
       
    31 	{
       
    32 	StackItem* item=(StackItem*)LinkedList::TailItem();
       
    33 	LinkedList::RemoveItem(item);
       
    34 	return item;
       
    35 	}
       
    36 
       
    37 void Stack::Push(StackItem* aNewItem)
       
    38 	{
       
    39 	LinkedList::AddToTail(aNewItem);
       
    40 	}
       
    41 	
       
    42 StackItem * Stack::Peek()
       
    43 	{
       
    44 	return (StackItem*)LinkedList::TailItem();
       
    45 	}