#include <CNCL/QueueSPT.h>
CN_QUEUESPT
CNQueue
None
CNDLList, CNQueueFIFO, CNQueueLIFO, CNQueueRandom, CNPrioQueueFIFO, CNSink, CNJob, CNStack
CNQueueSPT
is a queue, implemented as a doubly linked list, that
can contain any number (well, sort of ... ;-) CNCL compatible (restrictions
see below) objects.
The queueing strategy is SPT, that means jobs with the shortest processing
time are delivered first. The processing time is read from the public
identifier length
of the CNJob
object. SPT queues only accept
objects derived from CNJob
.
Constructors:
CNQueueSPT();
CNQueueSPT(CNParam *param);
In addition to the member functions required by CNCL, CNQueueSPT
provides:
virtual bool empty() const;
TRUE
, if the queue is empty.
virtual bool full() const;
FALSE
.
virtual int length() const;
virtual void put(CNObject *obj);
CNJob
may be
put into a SPT queue.
virtual CNObject *get();
virtual CNObject *peek();
get()
, the object is not removed from the queue.
virtual void delete_all();
Go to the first, previous, next, last section, table of contents.