ROSE 0.11.145.192
|
List node bidirectional iterator.
This iterator traverse the elements of the list in the order they are stored in the list and returns a reference to a storage node (Node, a user-defined value and associated ID number) when dereferenced. If one wants to traverse elements in the order of the ID numbers instead, just use a "for" loop to iterate from zero to the number of items in the list and make use of the constant-time lookup-by-ID feature.
Iterators are stable across insertion and erasure. In other words, an iterator is guaranteed to not become invalid when other elements are added to or removed from the container. Added elements will become part of any existing iterator traversals when they are inserted between that iterator's current and ending position.
Node ID numbers are accessed from the iterator by invoking its id
method. ID numbers are stable across insertion, but not erasure; erasing an element from the list will cause zero or one other element to receive a new ID number, and this new ID will be immediately reflected in all existing iterators that point to the affected node.
Definition at line 207 of file IndexedList.h.
#include <Sawyer/IndexedList.h>
Public Member Functions | |
NodeIterator (const NodeIterator &other) | |
NodeIterator & | operator= (const NodeIterator &other) |
Node & | operator* () const |
Node * | operator-> () const |
|
inline |
Definition at line 210 of file IndexedList.h.
|
inline |
Definition at line 211 of file IndexedList.h.
|
inline |
Definition at line 212 of file IndexedList.h.
|
inline |
Definition at line 213 of file IndexedList.h.
|
inline |
Definition at line 214 of file IndexedList.h.