Om
1.0.0
A universal framework for multimedia simulation
|
Iterator class for a linked list which can't modify it. More...
#include <omLinkedList.h>
Public Member Functions | |
ConstIterator (const LinkedList< T > &newList) | |
Create a new linked list iterator from a reference to a list. More... | |
ConstIterator (const Iterator &iterator) | |
Create a new const linked list iterator from a non-const iterator. More... | |
operator Bool () const | |
Return whether or not the iterator is at the end of the list. More... | |
void | operator++ () |
Prefix increment operator. More... | |
void | operator++ (int) |
Postfix increment operator. More... | |
const T & | operator* () |
Return a reference to the current iterator element. More... | |
const T * | operator-> () |
Access the current iterator element. More... | |
void | reset () |
Reset the iterator to the beginning of the list. More... | |
Iterator class for a linked list which can't modify it.
It's purpose is to efficiently iterate through all or some of the elements in the linked list, making changes as necessary. It avoids the O(n) time of removing or adding elements to the list under ordinary situations.
|
inline |
Create a new linked list iterator from a reference to a list.
|
inline |
Create a new const linked list iterator from a non-const iterator.
|
inline |
Return whether or not the iterator is at the end of the list.
If the iterator is at the end of the list, return FALSE. Otherwise, return TRUE.
|
inline |
Prefix increment operator.
|
inline |
Postfix increment operator.
|
inline |
Return a reference to the current iterator element.
|
inline |
Access the current iterator element.
|
inline |
Reset the iterator to the beginning of the list.