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


CNQueueLIFO -- LIFO queue

SYNOPSIS

#include <CNCL/QueueLIFO.h>

TYPE

CN_QUEUELIFO

BASE CLASSES

CNQueue

DERIVED CLASSES

None

RELATED CLASSES

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

DESCRIPTION

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

Constructors:

CNQueueLIFO();
CNQueueLIFO(CNParam *param);
Initialize the LIFO-queue to an empty state.

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

virtual bool empty() const;
Returns TRUE, if the queue is empty.
virtual bool full() const;
Always returns FALSE.
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.