Tools.h++ Class Reference

Table Of Contents
has been used for this tester function.
Persistence
None
Public Constructors
RWGSlist(type)();
Construct an empty collection.
RWGSlist(type)(type* a);
Construct a collection with one entry a.
RWGSlist(type)(const RWGSlist(type)& a);
Copy constructor. A shallow copy of a is made.
Assignment Operator
void
operator=(const RWGSlist(type)&);
Assignment operator. A shallow copy of a is made.
Public Member Functions
type*
append(type* a);
Adds an item to the end of the collection and returns it. Returns nil if the insertion was
unsuccessful.
void
apply(void (*ap)(type*, void*), void* );
Visits all the items in the collection in order, from first to last, calling the user-provided
function pointed to by ap for each item. This function should have prototype:
void yourApplyFunction(type* c, void*);
and can perform any operation on the object at address c. The last argument is useful for
passing data to the apply function.
type*&
at(size_t i);
const type*
at(size_t i) const;