#include <CNCL/PrioQueueFIFO.h>
CN_PRIOQUEUEFIFO
CNQueue
None
CNDLList, CNQueueFIFO, CNQueueLIFO, CNQueueRandom, CNQueueSPT, CNSink, CNJob, CNStack
CNPrioQueueFIFO is a queue, implemented as some FIFO queues, that
can contain any number (well, sort of ... ;-) CNCL compatible (restrictions
see below) objects.
A priority queue consists of a number of simple FIFO queues, one for each
priority. The priority value (0 to ...) is taken from the public identifier
priority of the CNJob object. Lower values mean higher priority
in access. Only objects derived from CNJob are accepted.
Constructors:
CNPrioQueueFIFO();
CNPrioQueueFIFO(CNParam *param);
CNPrioQueueFIFO(int prios);
prios value
determines the number of different priority steps for. By default
prios is set to two.
In addition to the member functions required by CNCL, CNPrioQueueFIFO
provides:
virtual bool empty() const;
TRUE, if all internal queues are empty.
virtual bool full() const;
FALSE.
virtual int length() const;
virtual void put(CNObject *obj);
CNJob may be
put into a priority queue.
virtual CNObject *get();
priority is
retrieved.
virtual CNObject *peek();
get(), the object is
not removed from the queue.
virtual void delete_all();
int priorities();
Go to the first, previous, next, last section, table of contents.