blob: 024acf149e5798da458c3cd6573b7fa748551480 (
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
|
/**
* @file llstack.h
* @brief LLStack template class
*
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#ifndef LL_LLSTACK_H
#define LL_LLSTACK_H
#include "linked_lists.h"
template <class DATA_TYPE> class LLStack
{
private:
LLLinkedList<DATA_TYPE> mStack;
public:
LLStack() {}
~LLStack() {}
void push(DATA_TYPE *data) { mStack.addData(data); }
DATA_TYPE *pop() { DATA_TYPE *tempp = mStack.getFirstData(); mStack.removeCurrentData(); return tempp; }
void deleteAllData() { mStack.deleteAllData(); }
void removeAllNodes() { mStack.removeAllNodes(); }
};
#endif
|