|
Queue Class Reference#include <QueueP.h>
List of all members.
Detailed Description
ADT queue - Pointer-based implementation.
Definition at line 22 of file QueueP.h.
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 24 of file QueueP.cpp. |
Queue::Queue |
( |
const Queue & |
Q |
) |
|
|
|
Copy constructor. - Parameters:
-
Definition at line 28 of file QueueP.cpp. |
Member Function Documentation
bool Queue::isEmpty |
( |
|
) |
const |
|
|
Determines whether this queue is empty. - Precondition:
- None.
- Postcondition:
- None.
- Returns:
- True if this queue is empty; otherwise returns false.
Definition at line 39 of file QueueP.cpp.
References backPtr.
Referenced by dequeue(), and ~Queue(). |
|
Inserts an item at the back of this queue. - Precondition:
- newItem is the item to be inserted.
- Postcondition:
- If the insertion is successful, newItem is at the back of this queue.
- Exceptions:
-
Definition at line 44 of file QueueP.cpp.
References Queue::QueueNode::item, and Queue::QueueNode::next.
Referenced by main(). |
|
Retrieves and deletes the front of this queue. - Precondition:
- None.
- Postcondition:
- If this queue is not empty, queueFront contains the item that was added to this queue earliest, and the item is deleted.
- Exceptions:
-
Definition at line 94 of file QueueP.cpp. |
|
Retrieves the item at the front of this queue. - Precondition:
- None.
- Postcondition:
- If this queue is not empty, queueFront contains the item that was added to this queue earliest.
- Exceptions:
-
Definition at line 107 of file QueueP.cpp. |
Member Data Documentation
The documentation for this class was generated from the following files:
|