#include <mmap.h>
Public Methods | |
MapIter (const Map< keyclass, valueclass > &map) | |
void | first () |
void | next () |
const keyclass& | key () const |
keyclass& | key () |
const valueclass& | value () const |
valueclass& | value () |
int | exhausted () const |
Protected Attributes | |
GenHashIter | iter |
Usage:
for (MapIter<String,String> iter (myMap); !iter.exhausted(); iter.next())
printf("s=s
", (CONSTR) iter.key(), (CONSTR) iter.value());
, which prints the key-value-pairs of the map to stdout.
See mmap.h for additional macros forMap and forStringMap for somewhat easier iteration. For example:
forStringMap (myMap, iter) { printf("s", (CONSTR) iter.value()); }
, which prints the values in the map to stdout.
Definition at line 433 of file mmap.h.
|
Returns 1 (true) if all the items in the mmap.have been iterated, 0 (false) otherwise.
|
|
Points the iterator to the first item in the Map.
|
|
Returns a non-const reference to the key in the current position of the iterator.
|
|
Returns a const reference to the key in the current position of the iterator.
|
|
Moves the iterator to next item in the Map.
|
|
Returns a non-const reference to the value in the current position of the iterator.
|
|
Returns a const reference to the value in the current position of the iterator.
|