Tools.h++ Class Reference

Table Of Contents
Persistence
Isomorphic
Example
In this example, a singly-linked list of RWDates is exercised.
//
// tvslint.cpp
//
#include<rw/tvslist.h>
#include<iostream.h>
void div5(int& x, void *y){x = x/5;}
int main()
{
const int vec[10] = {45,10,5,15,25,30,35,20,40,50};
RWTValSlist<int> lst(vec, vec+10);
RWTValSlistIterator<int> itr(lst);
lst.apply(div5, 0);
lst.sort();
for(;itr();)
cout << itr.key() << " ";
cout << endl;
return 0;
}
Program Output:
1 2 3 4 5 6 7 8 9 10
Related Classes
Classes RWTValDeque<T>, RWTValDlist<T>, and RWTValOrderedVector<T> also provide a
Rogue Wave interface to C++-standard sequence collections.
The Rogue Wave supplied, standard-compliant class rw_slist<T> is the collection that serves as
the underlying implementation for this class.