aboutsummaryrefslogtreecommitdiff
path: root/src/stack.cpp
blob: 8d9565c55fc549bf2cc4eb9daaf3640da91d165c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "stack.h"

void Stack::push( void *data )
{
	lStackData.append( data );
}

void *Stack::top()
{
	return lStackData.getAt( lStackData.getSize()-1 );
}

void Stack::pop()
{
	lStackData.deleteAt( lStackData.getSize()-1 );
}

void *Stack::poptop()
{
	void *dat = top();
	pop();
	return dat;
}

bool Stack::isEmpty()
{
	return lStackData.isEmpty();
}

void Stack::empty()
{
	lStackData.empty();
}