Tools.h++ Class Reference

Table Of Contents
Persistence
Isomorphic.
Example
In this example, a sorted doubly-linked list of RWDates is exercised.
//
// tvsdldat.cpp
//
#include <rw/tvsrtdli.h>
#include <rw/rwdate.h>
#include <iostream.h>
#include <function.h>
main(){
RWTValSortedDList<RWDate, less<RWDate> > lst;
lst.insert(RWDate(10, "Aug", 1991));
lst.insert(RWDate(9, "Aug", 1991));
lst.insert(RWDate(1, "Sep", 1991));
lst.insert(RWDate(14, "May", 1990));
lst.insert(RWDate(1, "Sep", 1991)); // Add a duplicate
lst.insert(RWDate(2, "June", 1991));
for (int i=0; i<lst.entries(); i++)
cout << lst[i] << endl;
return 0;
}
Program Output:
05/14/90
06/02/91
08/09/91
08/10/91
09/01/91
09/01/91
Related Classes
RWTValSortedVector<T> is an alternative always-sorted collections. RWTValDlist<T> is an
unsorted doubly-linked list of values.
Class list<T,allocator> is the C++-standard collection that serves as the underlying