Go to the first, previous, next, last section, table of contents.


CNQueueFIFO -- FIFO Queue

SYNOPSIS

#include<CNCL/QueueFIFO.h>

TYPE

CN_QUEUEFIFO

BASE CLASSES

CNQueue

DERIVED CLASSES

none

RELATED CLASSES

CNDLList, CNQueueLIFO, CNQueueRandom, CNQueueSPT, CNPrioQueueFIFO, CNSink, CNJob, CNStack

DESCIPTION

CNQueueFIFO is a queue, implemented as a doubly linked list, that can contain any number (well, sort of ... ;-) CNCL compatible objects. The queueing strategy is FIFO (First In, First Out).

Constructors:

CNQueueFIFO();
CNQueueFIFO(CNParam *param);
Initialize the FIFO-queue to an empty state.

In addition to the member functions required by CNCL, CNQueueFIFO provides:

virtual bool empty() const;
Returns TRUE, if the queue is empty.
virtual bool full() const;
Always returns TRUE.
virtual int length() const;
Returns the actual queue length.
virtual void put(CNObject *obj);
Puts an object into the queue.
virtual CNObject *get();
Retrieves an object from the queue.
virtual CNObject *peek();
Retrieves an object from the queue. Unlike get(), the object is not removed from the queue.
virtual void delete_all();
Deletes all objects in the queue.


Go to the first, previous, next, last section, table of contents.