Tools.h++ Class Reference

Table Of Contents
typedef RWBoolean (*yourTester)(const type*, const void*);
has been used for this tester function.
Persistence
None
Example
#include <rw/gdlist.h>
#include <rw/rstream.h>
declare(RWGDlist,int) /* Declare a list of ints */
main() {
RWGDlist(int) list; // Define a list of ints
int *ip;
list.insert(new int(5)); // Insert some ints
list.insert(new int(7));
list.insert(new int(1));
list.prepend(new int(11));
RWGDlistIterator(int) next(list);
while(ip = next() )
cout << *ip << endl; // Print out the members
while(!list.isEmpty())
delete list.get(); // Remove & delete list items
return 0;
}
Program output:
11
5
7
1
Public Constructors
RWGDlist(type)();
Construct an empty collection.