Tools.h++ Manual

21-130 104011 Tandem Computers Incorporated
21
RWIdentitySet
RWIdentitySet
|
RWSet
|
RWCollection
|
RWCollectable
Synopsis
#include <rw/idenset.h>
typedef RWIdentitySet IdentitySet; // Smalltalk typedef
RWIdentitySet a;
Description The class
RWIdentitySet
is similar to class
RWSet
except that items are
found by requiring that they be identical (i.e., have the same address) as the key,
rather than being equal (i.e., test true for
isEqual()
).
The iterator for this class is
RWSetIterator
.
Public constructor
RWIdentitySet(size_t n = RWDEFAULT_CAPACITY);
Construct an empty identity set with n hashing buckets.
Public member functions The user interface to this class is identical to class
RWSet
and is not reproduced
here. The only difference between the classes is that keys are found on the
basis of identity rather than equality, and that the virtual function
isA()
returns
__RWIDENTITYSET
, the
ClassId
for
RWIdentitySet
.