Tools.h++ Class Reference

Table Of Contents
virtual RWCollectable*
last() const;
Redefined from class RWSequenceable. Returns the last item in the collection.
virtual size_t
occurrencesOf(const RWCollectable* target) const;
Redefined from class RWCollection. Returns the number of items that compare isEqual to the item
pointed to by target.
RWCollectable*
prepend(RWCollectable*);
Redefined from class RWSequenceable. Adds the item to the beginning of the collection and returns
it. Returns nil if the insertion was unsuccessful.
void
push(RWCollectable* c);
This is an alternative implementation of a stack to class RWSlistCollectablesStack. The item pointed
to by c is put at the end of the collection.
RWCollectable*
pop();
This is an alternative implementation of a stack to class RWSlistCollectablesStack. The last item in
the collection is removed and returned. If there are no items in the collection, nil is returned.
virtual RWCollectable*
remove(const RWCollectable* target);
Redefined from class RWCollection. Removes the first item that isEqual to the item pointed to by
target and returns it. Returns nil if no item was found.
RWCollectable*
removeAt(size_t index);
Removes the item at the position index in the collection and returns it.
virtual void
removeAndDestroy(const RWCollectable* target);
Inherited from class RWCollection.
RWCollectable*
top() const;
This is an alternative implementation of a stack to class RWSlistCollectablesStack. The last item in
the collection is returned. If there are no items in the collection, nil is returned.