Tools.h++ Manual

21-64 104011 Tandem Computers Incorporated
21
RWCollection
RWCollection
|
RWCollectable
Synopsis
#include <rw/colclass.h>
typedef RWCollection Collection; // Smalltalk typedef
Description Class
RWCollection
is an abstract base class for the
Smalltalk
-like
collection classes. The class contains virtual functions for inserting and
retrieving pointers to
RWCollectable
objects into the collection classes.
Virtual functions are also provided for storing and reading the collections to
files and streams. Collections that inherit this base class will typically redefine
one or more of these functions.
In the documentation below, pure virtual functions are indicated by "= 0" in
their declaration. These functions must be defined in derived classes. For these
functions the description is intended to be generic—all inheriting collection
classes generally follow the described pattern. Exceptions are noted in the
documentation for the particular class.
For many other functions, a suitable definition is provided by
RWCollection
and a deriving class may not need to redefine the function. Examples are
contains()
or
restoreGuts()
.
Public member operators
void operator+=(const RWCollection&);
void operator-=(const RWCollection&);
Adds or removes, respectively, each item in the argument to or from self.