#include "CStack.h"
namespace CoreFW
{
template < class ClassType>
CStack<ClassType>::CStack()
{
}
template < typename ClassType >
CStack<ClassType>::~CStack()
{
m_StackList.clear() ;
}
template < typename ClassType >
bool CStack<ClassType>::Push( ClassType Item )
{
m_StackList.push_front( Item ) ;
return true ;
}
template < typename ClassType >
ClassType CStack<ClassType>::Pop( bool bRemoveFromStack )
{
if( m_StackList.size() <= 0 )
{
throw "No More Item Found In Stack" ;
}
ClassType Item ;
Item = m_StackList.front() ;
if( bRemoveFromStack == true )
m_StackList.pop_front() ;
return Item ;
}
template < typename ClassType >
bool CStack<ClassType>::IsEmpty() const
{
return ( m_StackList.size() == 0 ) ;
}
template < typename ClassType >
bool CStack<ClassType>::IsFull() const
{
return false ;
}
} // End namespace