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


CNSink -- Kitchen Sink

SYNOPSIS

#include <CNCL/Sink.h.h>

TYPE

CN_SINK

BASE CLASSES

CNQueue

DERIVED CLASSES

None

RELATED CLASSES

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

DESCRIPTION

CNSink is a data sink, implemented as queue with only an input side. All objects which are put into this sink are destroyed there. There is no queueing strategy.

Constructors:

CNSink();
CNSink(CNParam *param);
Initialize the Sink.

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

virtual bool empty() const;
Always returns TRUE.
virtual bool full() const;
Always returns FALSE.
virtual int length() const;
Returns the number of objects deleted in the queue.
virtual void put(CNObject *obj);
Puts an object into the queue. It will be deleted there.
virtual CNObject *get();
Produces an error. A sink is like a black hole.
virtual CNObject *peek();
Produces an error. A sink is like a black hole.
virtual void delete_all();
Sets the current sink to its initial state, the number of deleted objects is set to zero.


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