SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Const iterator for class RWSlistCollectables that traverses the linked-list from the first to last item. More...
#include <rw/slistcol.h>
Public Member Functions | |
RWSlistCollectablesConstIterator (const RWSlistCollectables &s) | |
RWSlistCollectablesConstIterator (const RWSlistCollectablesIterator &it) | |
bool | atFirst () const |
bool | atLast () const |
virtual const RWCollectable * | findNext (const RWCollectable *target) |
const RWCollectable * | findNextReference (const RWCollectable *e) |
virtual const RWCollectable * | key () const |
virtual const RWCollectable * | operator() () |
const void * | operator++ () |
const void * | operator+= (size_t n) |
virtual void | reset () |
void | toFirst () |
void | toLast () |
One of two iterators for class RWSlistCollectables. This version is a const
iterator, that cannot effect any changes to the data structure it is iterating through. This iterator traverses the linked-list from the first to last item.
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.
|
inline |
Constructs a const
iterator from a singly-linked list. Immediately after construction, the position of the iterator is undefined.
|
inline |
Constructs a const
iterator from an iterator. Immediately after construction, the position of the const
iterator is undefined.
|
inline |
Returns true
if the iterator is at the beginning of the list, otherwise returns false
.
|
inline |
Returns true
if the iterator is at the end of the list, otherwise returns false
.
|
inlinevirtual |
Moves iterator to the next item that isEqual() to the item pointed to by target and returns it. If no item is found, returns rwnil and the position of the iterator is undefined.
Implements RWConstIterator.
|
inline |
Moves iterator to the next item which is identical to the item pointed to by e (that is, that has address e) and returns it. If no item is found, returns rwnil and the position of the iterator is undefined.
|
inlinevirtual |
Returns the item at the current iterator position.
Implements RWConstIterator.
|
inlinevirtual |
Advances the iterator and returns the next item, or rwnil if the end of the collection has been reached.
Implements RWConstIterator.
|
inline |
Advances the iterator one item.
|
inline |
Advances the iterator n items.
|
inlinevirtual |
Resets the iterator, after which the position of the iterator is undefined.
Implements RWConstIterator.
|
inline |
Moves the iterator to the beginning of the list.
|
inline |
Moves the iterator to the end of the list.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |