template<class T> class PQueue

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.

Inheritance:


Public Methods

[more] Construction
[more] Overrides from class PObject
[more] New functions for class


Inherited from PAbstractList:

Public Methods

ovirtual Comparison Compare(const PObject & obj) const

Overrides from class PContainer

Overrides from class PCollection

Protected Methods

oPINLINE PObject& GetReferenceAt( PINDEX index ) const
oBOOL SetCurrent( PINDEX index ) const


Inherited from PCollection:

Public Methods

Common functions for collections


Inherited from PContainer:

Public Methods

Common functions for containers

Protected Methods

ovirtual void DestroyContents()
ovirtual void AssignContents(const PContainer & c)
ovoid CopyContents(const PContainer & c)
ovoid CloneContents(const PContainer* src)
ovoid Destruct()


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Public Members

Comparison functions


Documentation

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.

o Construction

o PQueue()
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.

o Overrides from class PObject

ovirtual PObject* Clone() const
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.

o New functions for class

ovirtual void Enqueue( T* obj )
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.

ovirtual T* Dequeue()
Remove an object that was added to the queue.

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.