00001 00032 #ifndef LL_LLSTACK_H 00033 #define LL_LLSTACK_H 00034 00035 #include "linked_lists.h" 00036 00037 template <class DATA_TYPE> class LLStack 00038 { 00039 private: 00040 LLLinkedList<DATA_TYPE> mStack; 00041 00042 public: 00043 LLStack() {} 00044 ~LLStack() {} 00045 00046 void push(DATA_TYPE *data) { mStack.addData(data); } 00047 DATA_TYPE *pop() { DATA_TYPE *tempp = mStack.getFirstData(); mStack.removeCurrentData(); return tempp; } 00048 void deleteAllData() { mStack.deleteAllData(); } 00049 void removeAllNodes() { mStack.removeAllNodes(); } 00050 }; 00051 00052 #endif 00053