QQueue(3qt)

NAME
QQueue - Template class that provides a queue

SYNOPSIS

#include <qqueue.h>

  Public Members
QQueue ()
QQueue ( const QQueue<type> & queue )
~QQueue ()
QQueue<type>& operator= ( const QQueue<type> & queue )
bool autoDelete () const
void setAutoDelete ( bool enable )
virtual uint count () const
bool isEmpty () const
void enqueue ( const type * d )
type* dequeue ()
bool remove ()
virtual void clear ()
type* head () const
operator type* ()const
type* current () const

DESCRIPTION
The QQueue class is a template class that provides a queue.

QQueue is implemented as both a template and a macro class. Define a template instance QQueue<X> to create a queue that operates on pointers to X, or X*.

A stack is a collection that can be used to enqueue and dequeue items.

See also: Collection Classes

MEMBER FUNCTION DOCUMENTATION

QQueue::QQueue ()
Creates an empty queue.

QQueue::QQueue ( const QQueue<type> & queue )
Creates a queue from another.

Only the pointers are copied.

QQueue::~QQueue ()
Destroys the list. Items in the list are destroyed if autoDelete() is TRUE.

QQueue::operator type* () const
Returns a reference to the first item in the queue. The queue is not changed.

type* QQueue::current () const
Returns a reference to the first item in the queue. The queue is not changed.

type* QQueue::dequeue ()
Removes the front item from the queue. Last in, last out.

void QQueue::enqueue ( const type * d )
Adds an item to the queue. Last in, last out.

type* QQueue::head () const
Returns a reference to the first item in the queue. The queue is not changed.

bool QQueue::isEmpty () const
Returns TRUE if there are no items to be dequeued

QQueue<type>& QQueue::operator= ( const QQueue<type> & queue )
Assigns queue to this queue and returns a reference to this queue.

This queue is first cleared, then each item in queue is enqueued to this queue. Only the pointers are copied (shallow copy).

bool QQueue::remove ()
Removes the front item from the queue. Last in, last out. The item is deleted if autoDelete() is TRUE. Returns TRUE if there was an item to remove.

SEE ALSO
http://www.troll.no/qt/qqueue.html

COPYRIGHT
Copyright 1992-1997 Troll Tech AS. See the LICENSE file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.