SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Allows sequential access to all the elements of RWHashTable and, as a const
iterator, it does not change anything in the underlying data structure.
More...
#include <rw/hashtab.h>
Public Member Functions | |
RWHashTableConstIterator (const RWHashTable &h) | |
RWHashTableConstIterator (const RWHashTableConstIterator &) | |
RWHashTableConstIterator (const RWHashTableIterator &it) | |
virtual const RWCollectable * | findNext (const RWCollectable *target) |
virtual const RWCollectable * | key () const |
virtual const RWCollectable * | operator() () |
virtual void | reset () |
One of two iterators for class RWHashTable. As a const
iterator, it does not change anything in the underlying data structure.
This iterator allows sequential access to all the elements of RWHashTable.
As with 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 brings undefined results.
#include <rw/hashtab.h> RWHashTable h; RWHashTableConstIterator it(h);
None
RWHashTableConstIterator::RWHashTableConstIterator | ( | const RWHashTable & | h | ) |
Constructs a const
iterator for an RWHashTable. After construction, the position of the iterator is undefined.
RWHashTableConstIterator::RWHashTableConstIterator | ( | const RWHashTableConstIterator & | ) |
Copy constructor. After construction, the position of the iterator is undefined.
RWHashTableConstIterator::RWHashTableConstIterator | ( | const RWHashTableIterator & | it | ) | [inline] |
Constructs a const
iterator from an iterator. After construction, the position of the const
iterator is undefined.
virtual const RWCollectable* RWHashTableConstIterator::findNext | ( | const RWCollectable * | target | ) | [virtual] |
Moves the iterator to the next item which isEqual() to the item pointed to by target and returns it.
Implements RWConstIterator.
Reimplemented in RWHashDictionaryConstIterator.
virtual const RWCollectable* RWHashTableConstIterator::key | ( | ) | const [virtual] |
Returns the item at the current iterator position.
Implements RWConstIterator.
Reimplemented in RWHashDictionaryConstIterator.
virtual const RWCollectable* RWHashTableConstIterator::operator() | ( | ) | [virtual] |
Advances the iterator and returns the next item, or rwnil if the end of the collection has been reached.
Implements RWConstIterator.
Reimplemented in RWHashDictionaryConstIterator.
virtual void RWHashTableConstIterator::reset | ( | ) | [virtual] |
Resets the iterator to the state it had immediately after construction.
Implements RWConstIterator.
Reimplemented in RWHashDictionaryConstIterator, and RWSetConstIterator.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.