Tools.h++ Manual
104011 Tandem Computers Incorporated 21-67
21
RWCollectable* remove(const RWCollectable*
target) = 0;
Removes and returns a pointer to the first item in the collection which
"matches" the object pointed to by
target
. Returns nil if no object was found.
Does not delete the object.
virtual void removeAndDestroy(const
RWCollectable* target);
Removes and deletes the first item in the collection which "matches" the object
pointed to by
target
.
RWCollection* select(testCollectable tst,
void* x) const;
Evaluates the function pointed to by
tst
for each item in the collection. It
inserts those items for which the function returns
TRUE
into a new collection
allocated off the heap of the same type as self and returns a pointer to this new
collection. Because the new collection is allocated off the heap, you are
responsible for deleting it when done.
virtual void saveGuts(RWFile&);
Redefined to call the global operator
RWFiles& operator<<(RWFile&, const RWCollectables&);
for each object in the collection.
virtual void saveGuts(RWvostream&);
RWvostream& operator<<(RWvostream&, const RWCollectable&);
for each object in the collection.