From 92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 18 Nov 2009 21:22:54 +0000 Subject: Hey, fixed the problems in heap. It should now work properly no matter what the data or order etc. --- src/queue.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/queue.h') diff --git a/src/queue.h b/src/queue.h index 78f6db6..8b5c607 100644 --- a/src/queue.h +++ b/src/queue.h @@ -8,14 +8,29 @@ #ifndef BU_QUEUE_H #define BU_QUEUE_H -#include - namespace Bu { - template > + /** + * Queue abstract baseclass + */ + template class Queue { public: + Queue() + { + } + + virtual ~Queue() + { + } + + virtual void enqueue( const value &i )=0; + virtual value dequeue()=0; + virtual value &peek()=0; + virtual const value &peek() const=0; + virtual bool isEmpty() const=0; + virtual int getSize() const=0; private: -- cgit v1.2.3