Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

queue Class Template Reference

The queue class extends the FIFO_LIST template (which in this case is instantiated with queueElem *. More...

#include <queue.h>

Inheritance diagram for queue::

FIFO_LIST List of all members.

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...


Detailed Description

template<class T> class queue

The queue class extends the FIFO_LIST template (which in this case is instantiated with queueElem *.

This class is designed to support breadth first printing of a wavelet packet tree.

Author:
Ian Kaplan

Definition at line 94 of file queue.h.


Member Function Documentation

template<class T>
void queue<T>::addQueue ( packnode< T > * node,
size_t indent ) [inline]
 

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

template<class T>
void queue<T>::deleteStart ( ) [inline]
 

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

template<class T>
bool queue<T>::queueEmpty ( ) [inline]
 

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); }

template<class T>
queueElem< T > * queue<T>::queueStart ( ) [inline]
 

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


The documentation for this class was generated from the following file:
Generated at Sat Aug 10 13:23:39 2002 for Wavelet Packet Transform and Lossless Compression by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001