User Tools

Site Tools


notes:data:queue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:data:queue [2010/11/20 01:50] ccarpe10notes:data:queue [2010/11/20 01:50] (current) ccarpe10
Line 1: Line 1:
 +====queuecreate.cc====
 +Constructor/destructor operations
 +
 +
 +===Queue() constructor===
 +
 +<code c++>
 +</code>
 +
 +^  Function  ^  Parameter(s)  ^  Return value  |
 +|  Queue()  |  none  |  pointer to the newly allocated queue  |
 +
 +Queue() is the parameterless constructor that is responsible for creating a new instance of a queue.
 +
 +===Node(int) constructor===
 +Overloaded constructor that will accept an initial integer value to be assigned to the newly allocated Queue's **value** member.
 +
 +<code c++>
 +</code>
 +
 +^  Function  ^  Parameter(s)  ^  Return value  |
 +|  Queue(int)  |  integer value to assign as Queue's initial value  |  pointer to the newly allocated queue  |
 +
 +===queueops.cc === 
 +Operations that deal with queue manipulation
 +
 +===Queue::enqueue(int value)===
 +enqueue(int value) - add a value to the start of the queue
 +
 +^  Function  ^  Parameter(s)  ^  Return value  |
 +|  bool enqueue()  |  integer  |  bool  |
 +
 +===Queue::dequeue()===
 +dequeue() - remove a node (LNode) from the end of the queue
 +
 +^  Function  ^  Parameter(s)  ^  Return value  |
 +|  LNode dequeue()  |  integer  |  bool  |
 +
 +===Queue::peek()===
 +peek() - view the next value in the queue
 +
 +^  Function  ^  Parameter(s)  ^  Return value  |
 +|  LNode * Queue ::  peek(int value)  |  void  |  void  |
 +