text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

QueueA.h

Go to the documentation of this file.
00001 
00017 #include "QueueException.h"
00018 const int MAX_QUEUE = maximum-size-of-queue;
00019 typedef desired-type-of-queue-item QueueItemType;
00020 
00023 class Queue
00024 {
00025 public:
00026 // constructors and destructor:
00028    Queue();
00029    // copy constructor and destructor are
00030    // supplied by the compiler
00031 
00032 // Queue operations:
00033    bool isEmpty() const;
00034    void enqueue(const QueueItemType& newItem)
00035       throw(QueueException);
00036    void dequeue() throw(QueueException);
00037    void dequeue(QueueItemType& queueFront)
00038       throw(QueueException);
00039    void getFront(QueueItemType& queueFront) const
00040       throw(QueueException);
00041 
00042 private:
00043    QueueItemType items[MAX_QUEUE];
00044    int           front;
00045    int           back;
00046    int           count;
00047 }; // end Queue
00048 // End of header file.

Generated on Sun Aug 27 17:20:03 2006 for AWLogo by  doxygen 1.4.6