QQueue(3qt)

NAME
QQueue - Template class that provides a queue

#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 a template class. Define a template instance QQueue<X> to create a queue that operates on pointers to X, or X*.

A queue is a First In, First Out (FIFO) structure. Items are added to the back of the queue with enqueue() and retrieved from the front with dequeue().

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 (shallow copy).

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

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

bool QQueue::autoDelete () const
The same as QCollection::autoDelete().

See also setAutoDelete().

void QQueue::clear () [virtual]
Removes all items from the queue, deleting them if if autoDelete() is TRUE.

See also remove().

Reimplemented from QCollection.

uint QQueue::count () const [virtual]
Returns the number of items in the queue.

See also isEmpty().

Reimplemented from QCollection.

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

type* QQueue::dequeue ()
Takes the front item from the queue. First in, first out.

void QQueue::enqueue ( const type * d )
Adds an item to the back of the queue. First in, first out.

type* QQueue::head () const
Returns a reference to the front 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. First in, first out. The item is deleted if autoDelete() is TRUE. Returns TRUE if there was an item to remove.

void QQueue::setAutoDelete ( bool enable )
The same as QCollection::setAutoDelete().

See also autoDelete().

SEE ALSO
http://doc.trolltech.com/qqueue.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qqueue.3qt) and the Qt version (2.3.5).