Tools.h++ Manual
104011 Tandem Computers Incorporated 21-119
21
virtual size_t occurrencesOf(const
RWCollectable* target) const;
Inherited from class
RWSet
. Returns the number of keys which isEqual to the
item pointed to by
target
. Because duplicates are not allowed, this function
can only return 0 or 1.
virtual RWCollectable* remove(const RWCollectable*
target);
Redefined from class
RWCollection
. Removes the key and value pair where
the key isEqual to the item pointed to by
target
. Returns the key, or nil if no
match was found.
virtual void removeAndDestroy(const
RWCollectable* target);
Redefined from class
RWCollection
. Removes and deletes the key and value
pair where the key isEqual to the item pointed to by
target
.
Note – Both the key and the value are deleted. Does nothing if the key is not
found.
RWCollectable* removeKeyAndValue(const
RWCollectable* target,
RWCollectable*& v);
Removes the key and value pair where the key isEqual to the item pointed to by
target
. Returns the key, or nil if no match was found. The value is put in
v
.
You are responsible for defining
v
before calling this function.
void resize(size_t n = 0);
Inherited from class
RWSet
.
virtual void restoreGuts(RWvistream&);
virtual void restoreGuts(RWFile&);
virtual void saveGuts(RWvostream&) const;
virtual void saveGuts(RWFile&) const;
Inherited from class
RWCollection
.