SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Allows sequential access to all the elements of RWHashDictionary and, as a const
iterator, does not change anything in the underlying data structure.
More...
#include <rw/hashdict.h>
Public Member Functions | |
RWHashDictionaryConstIterator (const RWHashDictionary &hd) | |
RWHashDictionaryConstIterator (const RWHashDictionaryIterator &it) | |
const RWCollectable * | findNext (const RWCollectable *target) |
const RWCollectable * | key () const |
const RWCollectable * | operator() () |
virtual void | reset () |
const RWCollectable * | value () const |
Public Member Functions inherited from RWSetConstIterator | |
RWSetConstIterator (const RWSet &h) | |
RWSetConstIterator (const RWSetIterator &it) | |
void | reset () |
Public Member Functions inherited from RWHashTableConstIterator | |
RWHashTableConstIterator (const RWHashTable &h) | |
RWHashTableConstIterator (const RWHashTableConstIterator &) | |
RWHashTableConstIterator (const RWHashTableIterator &it) | |
One of two iterators for class RWHashDictionary. This iterator allows sequential access to all the elements of RWHashDictionary, and, as a const
iterator, does not change anything in the underlying data structure. Since RWHashDictionary is unordered, 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 brings undefined results.
|
inline |
Constructs a const
iterator for an RWHashDictionary collection. Immediately after construction, the position of the iterator is undefined.
|
inline |
Constructs a const
iterator for an RWHashDictionary collection from an iterator. Immediately after construction, the position of the const
iterator is undefined.
|
virtual |
Moves the iterator to the next key-value pair where the key isEqual() to the object pointed to by target. Returns the key or rwnil if no key was found.
Reimplemented from RWHashTableConstIterator.
|
virtual |
Returns the key at the current iterator position.
Reimplemented from RWHashTableConstIterator.
|
virtual |
Advances the iterator to the next key-value pair and returns the key. Returns rwnil if the cursor is at the end of the collection. Use member function value() to recover the value.
Reimplemented from RWHashTableConstIterator.
|
inlinevirtual |
Resets the iterator to the state it had immediately after construction.
Reimplemented from RWHashTableConstIterator.
const RWCollectable* RWHashDictionaryConstIterator::value | ( | ) | const |
Returns the value at the current iterator position.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |