PQueue< T > Class Template Reference

#include <lists.h>

Inheritance diagram for PQueue< T >:

PAbstractList PCollection PContainer PObject List of all members.

Public Member Functions

Overrides from class PObject
virtual PObjectClone () const
New functions for class
virtual void Enqueue (T *obj)
virtual T * Dequeue ()

Protected Member Functions

 PQueue (int dummy, const PQueue *c)

Detailed Description

template<class T>
class PQueue< T >

This template class maps the PAbstractList to a specific object type, and adds functionality that allows the list to be used as a first in first out queue. The functions in this class primarily do all the appropriate casting of types.

By default, objects placed into the set will { not} be deleted when removed or when all references to the set are destroyed. This is different from the default on most collection classes.

Note that if templates are not used the PDECLARE_QUEUE# macro will simulate the template instantiation.


Constructor & Destructor Documentation

template<class T>
PQueue< T >::PQueue (  )  [inline]

Create a new, empty, queue.

Note that by default, objects placed into the queue will { not} be deleted when removed or when all references to the queue are destroyed. This is different from the default on most collection classes.

template<class T>
PQueue< T >::PQueue ( int  dummy,
const PQueue< T > *  c 
) [inline, protected]

template<class T>
PQueue< T >::PQueue (  )  [inline]

Create a new, empty, queue.

Note that by default, objects placed into the queue will { not} be deleted when removed or when all references to the queue are destroyed. This is different from the default on most collection classes.


Member Function Documentation

template<class T>
virtual PObject* PQueue< T >::Clone (  )  const [inline, virtual]

Make a complete duplicate of the list. Note that all objects in the array are also cloned, so this will make a complete copy of the list.

Reimplemented from PObject.

template<class T>
virtual void PQueue< T >::Enqueue ( T *  obj  )  [inline, virtual]

Add a new object to the queue. This places a new link at the "tail" of the list, which is the "in" side of the queue.

Parameters:
obj  Object to add to the queue.

template<class T>
virtual T* PQueue< T >::Dequeue (  )  [inline, virtual]

Remove an object that was added to the queue.

Returns:
first object added to the queue or NULL if queue empty.


The documentation for this class was generated from the following file:
Generated on Mon Sep 15 01:21:38 2008 for PTLib by  doxygen 1.5.1