SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWSlistCollectablesQueue Class Reference

A restricted interface to class RWSlistCollectables in order to implement a first in first out (FIFO) queue. More...

#include <rw/queuecol.h>

Inheritance diagram for RWSlistCollectablesQueue:
RWSlistCollectables RWSequenceable RWCollection RWCollectable

Public Member Functions

 RWSlistCollectablesQueue ()
 
 RWSlistCollectablesQueue (const RWSlistCollectablesQueue &queue)
 
 RWSlistCollectablesQueue (RWCollectable *a)
 
 RWSlistCollectablesQueue (RWSlistCollectablesQueue &&queue)
 
virtual RWCollectablecopy () const
 
virtual RWClassID isA () const
 
virtual bool isEqual (const RWCollectable *) const
 
virtual RWCollectablenewSpecies () const
 
RWSlistCollectablesQueueoperator= (const RWSlistCollectablesQueue &rhs)
 
RWSlistCollectablesQueueoperator= (RWSlistCollectablesQueue &&rhs)
 
virtual RWCollectableremove (const RWCollectable *)
 
- Public Member Functions inherited from RWSlistCollectables
 RWSlistCollectables ()
 
 RWSlistCollectables (const RWSlistCollectables &lst)
 
 RWSlistCollectables (RWCollectable *a)
 
 RWSlistCollectables (RWSlistCollectables &&lst)
 
virtual RWCollectableappend (RWCollectable *a)
 
virtual void apply (RWapplyCollectable ap, void *x)
 
virtual RWCollectable *& at (size_t i)
 
virtual const RWCollectableat (size_t i) const
 
virtual void clear ()
 
virtual bool contains (const RWCollectable *target) const
 
bool containsReference (const RWCollectable *e) const
 
virtual size_t entries () const
 
virtual RWCollectablefind (const RWCollectable *target) const
 
RWCollectablefindReference (const RWCollectable *e) const
 
virtual RWCollectablefirst () const
 
RWCollectableget ()
 
virtual size_t index (const RWCollectable *c) const
 
virtual RWCollectableinsert (RWCollectable *a)
 
virtual RWCollectableinsertAt (size_t indx, RWCollectable *e)
 
virtual bool isEmpty () const
 
virtual RWCollectablelast () const
 
virtual RWConstIteratornewConstIterator () const
 
virtual RWIteratornewIterator ()
 
virtual size_t occurrencesOf (const RWCollectable *target) const
 
size_t occurrencesOfReference (const RWCollectable *e) const
 
RWSlistCollectablesoperator= (const RWSlistCollectables &rhs)
 
RWSlistCollectablesoperator= (RWSlistCollectables &&rhs)
 
bool operator== (const RWSlistCollectables &s) const
 
RWCollectableremoveReference (const RWCollectable *e)
 
- Public Member Functions inherited from RWCollection
virtual ~RWCollection ()
 
RWBag asBag () const
 
RWBinaryTree asBinaryTree () const
 
RWOrdered asOrderedCollection () const
 
RWSet asSet () const
 
RWBinaryTree asSortedCollection () const
 
virtual RWspace binaryStoreSize () const
 
virtual void clearAndDestroy ()
 
void operator+= (const RWCollection &c)
 
void operator-= (const RWCollection &c)
 
virtual void restoreGuts (RWFile &)
 
virtual void restoreGuts (RWvistream &)
 
virtual void saveGuts (RWFile &) const
 
virtual void saveGuts (RWvostream &) const
 
RWCollectionselect (RWtestCollectable tst, void *vp) const
 
- Public Member Functions inherited from RWCollectable
virtual ~RWCollectable ()
 
virtual int compareTo (const RWCollectable *) const
 
virtual unsigned hash () const
 
RWspace recursiveStoreSize () const
 
RWStringID stringID () const
 

Private Member Functions

RWCollectableprepend (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
 

Detailed Description

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.

Synopsis
// Smalltalk typedef:
#include <rw/queuecol.h>
A restricted interface to class RWSlistCollectables in order to implement a first in first out (FIFO)...
Definition queuecol.h:54
Persistence
Polymorphic

Constructor & Destructor Documentation

◆ RWSlistCollectablesQueue() [1/4]

RWSlistCollectablesQueue::RWSlistCollectablesQueue ( )

Constructs an empty queue.

◆ RWSlistCollectablesQueue() [2/4]

RWSlistCollectablesQueue::RWSlistCollectablesQueue ( RWCollectable * a)
inline

Constructs a queue with single item a.

◆ RWSlistCollectablesQueue() [3/4]

RWSlistCollectablesQueue::RWSlistCollectablesQueue ( const RWSlistCollectablesQueue & queue)
inline

Makes a shallow copy of queue.

◆ RWSlistCollectablesQueue() [4/4]

RWSlistCollectablesQueue::RWSlistCollectablesQueue ( RWSlistCollectablesQueue && queue)
inline

Move constructor. The constructed RWSlistCollectablesQueue takes ownership of the data owned by queue.

Condition:
This method is available only on platforms with rvalue reference support.

Member Function Documentation

◆ copy()

virtual RWCollectable * RWSlistCollectablesQueue::copy ( ) const
virtual

Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWSlistCollectables.

◆ isA()

virtual RWClassID RWSlistCollectablesQueue::isA ( ) const
virtual

Returns __RWSLISTCOLLECTABLESQUEUE, i.e. a class identifier, that identifies this object's class.

Reimplemented from RWSlistCollectables.

◆ isEqual()

virtual bool RWSlistCollectablesQueue::isEqual ( const RWCollectable * t) const
virtual

Behaves as if compareTo(t) was invoked, returning true if the result equals 0, false otherwise.

Reimplemented from RWSlistCollectables.

◆ newSpecies()

virtual RWCollectable * RWSlistCollectablesQueue::newSpecies ( ) const
virtual

Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWSlistCollectables.

◆ operator=() [1/2]

RWSlistCollectablesQueue & RWSlistCollectablesQueue::operator= ( const RWSlistCollectablesQueue & rhs)
inline

Assignment operator. Makes a shallow copy of rhs.

◆ operator=() [2/2]

RWSlistCollectablesQueue & RWSlistCollectablesQueue::operator= ( RWSlistCollectablesQueue && rhs)
inline

Move assignment. Self takes ownership of the data owned by rhs.

Condition:
This method is available only on platforms with rvalue reference support.

◆ prepend()

RWCollectable * RWSlistCollectablesQueue::prepend ( RWCollectable * c)
inlineprivatevirtual

Adds c to the beginning of the collection and returns it. Returns rwnil if the insertion was unsuccessful.

Reimplemented from RWSlistCollectables.

◆ remove()

virtual RWCollectable * RWSlistCollectablesQueue::remove ( const RWCollectable * )
inlinevirtual

Calls get(). The argument is ignored.

Reimplemented from RWSlistCollectables.

◆ removeAndDestroy()

virtual void RWSlistCollectablesQueue::removeAndDestroy ( const RWCollectable * target)
inlineprivatevirtual

Removes and deletes the first item in the collection which "matches" the object pointed to by target.

Reimplemented from RWCollection.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.