Tools.h++ Class Reference

Table Of Contents
Member function apply() and the iterator are called repeatedly according to the count for an
item.
See class RWHashTable if you want duplicates to be stored, rather than merely counted.
Persistence
Polymorphic
Public Constructors
RWBag(size_t n = RWDEFAULT_CAPACITY);
Construct an empty bag with n buckets.
RWBag(const RWBag& b);
Copy constructor. A shallow copy of b will be made.
Public Member Operators
void
operator=(const RWBag& b);
Assignment operator. A shallow copy of b will be made.
RWBoolean
operator==(const RWBag& b) const;
Returns TRUE if self and bag b have the same number of total entries and if for every
key in self there is a corresponding key in b which isEqual and which has the same
number of entries.
Public Member Functions
virtual void
apply(RWapplyCollectable ap, void*);
Redefined from class RWCollection. This function has been redefined to apply the
user-supplied function pointed to by ap to each member of the collection in a generally
unpredictable order. If an item has been inserted more than once (i.e., more than one item
isEqual), then apply() will be called that many times. The user-supplied function should
not do anything that could change the hash value or the meaning of "isEqual" of the
items.
virtual RWspace
binaryStoreSize() const;
Inherited from class RWCollection.