#ifndef STACK_H #define STACK_H #include "Object.h" namespace Kylin { template class Stack : public Object { public: virtual void push(const T &value) = 0; virtual T pop() = 0; virtual T &top() = 0; const T &top() const { return const_cast(this)->top(); } virtual void clear() = 0; virtual size_t size() const = 0; }; } // namespace Kylin #endif // STACK_H