#include <queue.h>
Inheritance diagram for queue::
Public Methods | |
queueElem<T>* | queueStart () |
Get the first element in the queue. More... | |
void | deleteStart () |
Remove the element at the start of the list. More... | |
void | addQueue (packnode< T > *node, size_t indent) |
Add an element to the queue. More... | |
bool | queueEmpty () |
return true if the queue is empty. More... |
This class is designed to support breadth first printing of a wavelet packet tree.
Definition at line 94 of file queue.h.
|
Add an element to the queue.
Definition at line 122 of file queue.h. Referenced by packtree_base_int::breadthFirstPrint(), and packtree_base::breadthFirstPrint().
00123 { 00124 queueElem<T> *elem = new queueElem<T>(node, indent); 00125 add( elem ); 00126 } // addQueue |
|
Remove the element at the start of the list. This function does not actually call delete to recover the object. It relies on the fact that the FIFO_LIST template uses pool allocation and the memory will be recovered when the pool is deallocated. Definition at line 111 of file queue.h. Referenced by packtree_base_int::breadthFirstPrint(), and packtree_base::breadthFirstPrint().
00112 { 00113 handle h = first(); 00114 if (h != 0) { 00115 queueElem<T> *elem = get_item( h ); 00116 remove(); 00117 // no delete elem; 00118 } 00119 } // deleteStart |
|
return true if the queue is empty.
Definition at line 129 of file queue.h. Referenced by packtree_base_int::breadthFirstPrint(), and packtree_base::breadthFirstPrint().
00129 { return (first() == 0); } |
|
Get the first element in the queue.
Definition at line 98 of file queue.h. Referenced by packtree_base_int::breadthFirstPrint(), and packtree_base::breadthFirstPrint().
00099 { 00100 handle h = first(); 00101 queueElem<T> *elem = get_item( h ); 00102 return elem; 00103 } // queueStart |