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


CNQueue -- Abstract Queue Base Class

SYNOPSIS

#include <CNCL/Queue.h>

TYPE

CN_QUEUE

BASE CLASSES

CNObject

DERIVED CLASSES

CNPrioQueueFIFO, CNQueueFIFO, CNQueueLIFO, CNQueueRandom, CNQueueSPT,

CNSink

RELATED CLASSES

CNJob, CNStack

DESCRIPTION

CNQueue is a queue of any CNCL compatible object.

Constructors:

CNQueue();
CNQueue(CNParam *param);
Initialize the queue.

In addition to the member functions required by CNCL, CNQueue provides the following abstract member function, which must be implemented by the derived classes:

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


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