Click on the banner to return to the Class Reference home page.
Return to the Appendix home page.

©Copyright 1996 Rogue Wave Software

RWTPtrHashTableIterator<T>

Alternate template: Standard C++ Library not required

Synopsis

#include <rw/tphasht.h>
RWTPtrHashTable<T> table;
RWTPtrHashTableIterator<T> iterator(table);

Please Note!


If you do not have the Standard C++ Library, use the interface described here. Otherwise, use the interface to RWTPtrHashMultiSetIterator described in the Class Reference.



Description

Iterator for class RWTPtrHashTable<T>, allowing sequential access to all the elements of a hash table. Elements are not accessed in any particular order.

Like all Rogue Wave iterators, the "current item" is undefined immediately after construction -- you must define it by using operator() or some other (valid) operation.

Once the iterator has advanced beyond the end of the collection it is no longer valid -- continuing to use it will bring undefined results.

Persistence

None

Public Constructor

RWTPtrHashTableIterator(RWTPtrHashTable<T>& c);

Public Operators

RWBoolean
operator++();
T*
operator()();

Public Member Functions

RWTPtrHashTable<T>*
container() const;
T*
key() const;
void
reset();
void
reset(RWTPtrHashTable<T>& c);