Tools.h++ Class Reference

Table Of Contents
operator().
For both operator++ and operator(), iterating past the last element will return a value equivalent
to boolean false. Continued increments will return a value equivalent to false until reset() is
called.
Persistence
None
Examples
#include<rw/tpsrtdli.h>
#include<iostream.h>
#include<rw/cstring.h>
int main(){
RWTPtrSortedDlist<RWCString,less<RWCString> > a;
RWTPtrSortedDlistIterator<RWCString,less<RWCString> > itr(a);
a.insert(new RWCString("John"));
a.insert(new RWCString("Steve"));
a.insert(new RWCString("Mark"));
a.insert(new RWCString("Steve"));
for(;itr();)
cout << *itr.key() <<endl;
return 0;
}
Program Output
John
Mark
Steve
Steve
Public Constructors
RWTPtrSortedDlistIterator<T,C>(RWTPtrSortedDlist<T,C>& l);
Creates an iterator for the list l. The iterator begins in an undefined state and must be
advanced before the first element will be accessible