RWSlistCollectablesQueueRWSlistCollectablesRWSequenceable... ... RWCollectionRWCollectable
// Smalltalk typedef: typedef RWSlistCollectablesQueue Queue ; #include <rw/queuecol.h> RWSlistCollectablesQueue a;
Class RWSlistCollectablesQueue represents a restricted interface to class RWSlistCollectables to implement a first in first out (FIFO) queue. A queue is a sequential list for which all insertions are made at one end (the "tail"), but all removals are made at the other end (the "head"). Hence, the ordering is determined externally by the ordering of the insertions. Duplicates are allowed.
An object stored by RWSlistCollectablesQueue must inherit abstract base class RWCollectable. The virtual function isEqual() (see class RWCollectable) is required, to find a match between a target and an item in the queue.
This class corresponds to the Smalltalk class Queue.
Polymorphic
RWSlistCollectablesQueue();
Construct an empty queue.
RWSlistCollectablesQueue(RWCollectable* a);
Construct an queue with single item a.
RWSlistCollectablesQueue(const RWSlistCollectablesQueue & q);
Copy constructor. A shallow copy of the queue q is made.
void operator=(const RWSlistCollectablesQueue & q);
Assignment operator. A shallow copy of the queue q is made.
virtual void apply(RWapplyCollectable ap, void*);
Inherited from class RWSlistCollectables.
virtual RWCollectable* append(RWCollectable*);
Inherited from class RWSlistCollectables. Adds an element to the end of the queue.
virtual RWspace binaryStoreSize() const;
Inherited from class RWCollection.
virtual void clear();
Inherited from class RWSlistCollectables.
virtual void clearAndDestroy(); virtual RWBoolean contains(const RWCollectable* target) const;
Inherited from class RWCollection.
RWBoolean containsReference(const RWCollectable* e) const; virtual size_t entries() const;
Inherited from class RWSlistCollectables.
virtual RWCollectable* first() const;
Inherited from class RWSlistCollectables. Returns the item at the beginning of the queue (i.e., the least recently inserted item). Returns nil if the queue is empty.
RWCollectable* get();
Inherited from class RWSlistCollectables. Returns and removes the item at the beginning of the queue (i.e., the least recently inserted item). Returns nil if the queue is empty.
virtual RWCollectable* insert(RWCollectable* c);
Redefined from class RWSlistCollectables to call append().
virtual RWClassID isA() const;
Redefined from class RWCollectable to return __RWSLISTCOLLECTABLESQUEUE.
virtual RWBoolean isEmpty() const;
Inherited from class RWSlistCollectables.
virtual RWCollectable* last() const;
Inherited from class RWSlistCollectables. Returns the last item in the queue (the most recently inserted item).
virtual size_t occurrencesOf(const RWCollectable* target) const; size_t occurrencesOfReference(const RWCollectable* e) const;
Inherited from class RWSlistCollectables.
virtual RWCollectable* remove(const RWCollectable*);
Redefined from class RWSlistCollectables. Calls get(). The argument is ignored.