/* $Id: stack.h,v 1.3 1996/11/06 11:37:49 roitzsch Exp $ */ #ifndef STACK_TEMPLATE_H #define STACK_TEMPLATE_H #include "kvector.h" #define AnnounceExtensionFlag 0 const int DefaultSize=25; template class Stack : public Vector { public: int top; Stack(int l1, int top1, int h1); Stack(int l1, int top1); Stack(int top1); Stack(); virtual ~Stack() { } void push(const T a); T pop(); T Prev() const; virtual T Top() const; int empty() const { return this->h < this->l; } virtual void resize(int newTop); virtual void resize(int newl, int newTop); virtual void resize(int newl, int newTop, int newh); private: void extend(); Stack(Stack& st); // disallowed! // Stack& operator= (Stack& stck); // Stack& operator= (T a); }; // ---------------------------------------------------------------------------- #if INCLUDE_TEMPLATE_DEFS #include "stack.c" #endif #endif