Tools.h++ Class Reference

Table Of Contents
Returns a pointer to the ith item in the collection. The first variant can be used as an
lvalue, the second cannot. The index i must be between zero and the number of items in
the collection less one, or an exception of type TOOL_INDEX will be thrown.
void
clear();
Removes all items in the collection.
RWBoolean
contains(yourTester t, const void* d) const;
Returns TRUE if the collection contains an item for which the user-defined function
pointed to by t finds a match with d.
RWBoolean
containsReference(const type* e) const;
Returns TRUE if the collection contains an item with the address e.
size_t
entries() const;
Returns the number of items in the collection.
type*
find(yourTester t, const void* d) const;
Returns the first item in the collection for which the user-provided function pointed to by
t finds a match with d, or nil if no item is found.
type*
findReference(const type* e) const;
Returns the first item in the collection with the address e, or nil if no item is found.
type*
first() const;
Returns the first item of the collection.
type*
get();
Returns and removes the first item of the collection.
type*
insert(type* e);
Adds an item to the end of the collection and returns it. Returns nil if the insertion was
unsuccessful.
void
insertAt(size_t indx, type* e);
Adds a new item to the collection at position indx. The item previously at position i is