![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
QueueL.hGo to the documentation of this file.00001 00017 #include "ListP.h" // ADT list operations 00018 #include "QueueException.h" 00019 typedef ListItemType QueueItemType; 00020 00023 class Queue 00024 { 00025 public: 00026 // constructors and destructor: 00027 00029 Queue(); 00030 00033 Queue(const Queue& Q); 00034 00036 ~Queue(); 00037 00038 // Queue operations: 00039 bool isEmpty() const; 00040 void enqueue(const QueueItemType& newItem) 00041 throw(QueueException); 00042 void dequeue() throw(QueueException); 00043 void dequeue(QueueItemType& queueFront) 00044 throw(QueueException); 00045 void getFront(QueueItemType& queueFront) const 00046 throw(QueueException); 00047 00048 private: 00049 List aList; // list of queue items 00050 }; // end Queue 00051 // End of header file. |