A restricted interface to class RWSlistCollectables in order to implement a first in first out (FIFO) queue. More...
#include <rw/queuecol.h>
Private Member Functions | |
RWCollectable * | prepend (RWCollectable *) |
virtual void | removeAndDestroy (const RWCollectable *) |
Additional Inherited Members | |
Static Public Member Functions inherited from RWCollectable | |
static RWClassID | classID (const RWStringID &name) |
static RWClassID | classIsA () |
static bool | isAtom (RWClassID id) |
static RWspace | nilStoreSize () |
Static Public Attributes inherited from RWCollection | |
static size_t | DEFAULT_CAPACITY |
Related Functions inherited from RWCollection | |
typedef void(* | RWapplyCollectable) (RWCollectable *, void *) |
typedef bool(* | RWtestCollectable) (const RWCollectable *, const void *) |
typedef bool(* | RWtestCollectablePair) (const RWCollectable *, const RWCollectable *, const void *) |
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"), and 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 from abstract base class RWCollectable. You must use the virtual function isEqual() (see class RWCollectable) to find a match between a target and an item in the queue.
This class corresponds to the Smalltalk class Queue.
RWSlistCollectablesQueue::RWSlistCollectablesQueue | ( | ) |
Constructs an empty queue.
|
inline |
Constructs a queue with single item a.
|
inline |
Makes a shallow copy of queue.
|
inline |
Move constructor. The constructed RWSlistCollectablesQueue takes ownership of the data owned by queue.
|
virtual |
Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWSlistCollectables.
|
virtual |
Returns __RWSLISTCOLLECTABLESQUEUE
, i.e. a class identifier, that identifies this object's class.
Reimplemented from RWSlistCollectables.
|
virtual |
Behaves as if compareTo(t) was invoked, returning true
if the result equals 0, false
otherwise.
Reimplemented from RWSlistCollectables.
|
virtual |
Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWSlistCollectables.
|
inline |
Move assignment. Self takes ownership of the data owned by rhs.
|
inline |
Assignment operator. Makes a shallow copy of rhs.
|
inlineprivatevirtual |
Adds c to the beginning of the collection and returns it. Returns rwnil if the insertion was unsuccessful.
Reimplemented from RWSlistCollectables.
|
inlinevirtual |
Calls get(). The argument is ignored.
Reimplemented from RWSlistCollectables.
|
inlineprivatevirtual |
Removes and deletes the first item in the collection which "matches" the object pointed to by target.
Reimplemented from RWCollection.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |