aboutsummaryrefslogtreecommitdiff
path: root/src/stack.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
commitf7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54 (patch)
tree53cec4864776e07950e3c72f2a990a1017d08045 /src/stack.cpp
downloadlibbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.gz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.bz2
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.xz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.zip
libbu++ is finally laid out the way it should be, trunk, branches, and tags.
Diffstat (limited to 'src/stack.cpp')
-rw-r--r--src/stack.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/stack.cpp b/src/stack.cpp
new file mode 100644
index 0000000..8d9565c
--- /dev/null
+++ b/src/stack.cpp
@@ -0,0 +1,33 @@
1#include "stack.h"
2
3void Stack::push( void *data )
4{
5 lStackData.append( data );
6}
7
8void *Stack::top()
9{
10 return lStackData.getAt( lStackData.getSize()-1 );
11}
12
13void Stack::pop()
14{
15 lStackData.deleteAt( lStackData.getSize()-1 );
16}
17
18void *Stack::poptop()
19{
20 void *dat = top();
21 pop();
22 return dat;
23}
24
25bool Stack::isEmpty()
26{
27 return lStackData.isEmpty();
28}
29
30void Stack::empty()
31{
32 lStackData.empty();
33}