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/tvmmap.h>
#include<iostream.h>
#include<rw/cstring.h>
int main(){
RWTValMultiMap<RWCString,int,greater<RWCString> > a;
RWTValMultiMapIterator
<RWCString,int,greater<RWCString> > itr(a);
a.insert("John", 30);
a.insert("Steve",17);
a.insert("Mark",24);
a.insert("Steve",24);
for(;itr();)
cout << itr.key() << "\'s age is " << itr.value() << endl;
return 0;
}
Program Output
Steve's age is 17
Steve's age is 24
Mark's age is 24
John's age is 30
Public Constructors
RWTValMultiMapIterator<K,T,C>
(RWTValMultiMap<K,T,C>&m);
Creates an iterator for the multi-map m. The iterator begins in an undefined state and
must be advanced before the first association will be accessible.