SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Iterator for class RWSlistCollectables. Traverses the linked-list from the first to last item. More...
#include <rw/slistcol.h>
Public Member Functions | |
RWSlistCollectablesIterator (RWSlistCollectables &s) | |
bool | atFirst () const |
bool | atLast () const |
virtual RWCollectable * | findNext (const RWCollectable *target) |
RWCollectable * | findNextReference (const RWCollectable *e) |
RWCollectable * | insertAfterPoint (RWCollectable *a) |
virtual RWCollectable * | key () const |
virtual RWCollectable * | operator() () |
void * | operator++ () |
void * | operator+= (size_t n) |
RWCollectable * | remove () |
RWCollectable * | removeNext (const RWCollectable *target) |
RWCollectable * | removeNextReference (const RWCollectable *e) |
virtual void | reset () |
void | toFirst () |
void | toLast () |
Iterator for class RWSlistCollectables. 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 result in undefined behavior.
|
inline |
Constructs an iterator from a singly-linked list. Immediately after construction, the position of the 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 will be undefined.
Implements RWIterator.
|
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 will be undefined.
|
inline |
Insert item a after the current cursor position and return the item. The cursor's position will be unchanged.
|
inlinevirtual |
Returns the item at the current iterator position.
Implements RWIterator.
|
inlinevirtual |
Advances the iterator and returns the next item, or rwnil if the end of the collection has been reached.
Implements RWIterator.
|
inline |
Advances the iterator one item.
|
inline |
Advances the iterator n items.
|
inline |
Removes and returns the item at the current cursor position. Afterwards, the iterator will be positioned at the previous item in the list. This function is not very efficient in a singly-linked list.
|
inline |
|
inline |
Moves iterator to the next item in the list which is identical to the item pointed to by e (that is, that has address e), removes it from the list and returns it. Afterwards, the iterator will be positioned at the previous item in the list. If no item is found, returns rwnil and the position of the iterator will be undefined.
|
inlinevirtual |
Resets the iterator. Afterwards, the position of the iterator will be undefined.
Implements RWIterator.
|
inline |
Moves the iterator to the beginning of the list.
|
inline |
Moves the iterator to the end of the list.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |