Om
1.0.0
A universal framework for multimedia simulation
|
Iterator class for an static array list. More...
#include <omStaticArrayList.h>
Public Member Functions | |
Iterator (StaticArrayList &newList) | |
Create a new static array list iterator from a reference to a list. More... | |
void | operator++ () |
Prefix increment operator. More... | |
void | operator++ (int) |
Postfix increment operator. More... | |
operator Bool () const | |
Return whether or not the iterator is at the end of the list. More... | |
T & | operator* () |
Return a reference to the current iterator element. More... | |
T * | operator-> () |
Access the current iterator element. More... | |
void | remove () |
Remove the current element from the list. More... | |
void | removeUnordered () |
Remove the current element from the list. More... | |
void | reset () |
Reset the iterator to the beginning of the list. More... | |
SizeType | getIndex () |
Get the index of the next element to be iterated over. More... | |
Iterator class for an static array list.
The purpose of this class is to iterate through all or some of the elements in the static array list, making changes as necessary to the elements.
|
inline |
Create a new static array list iterator from a reference to a list.
|
inline |
Prefix increment operator.
|
inline |
Postfix increment operator.
|
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, indicating that there are more elements to iterate over.
|
inline |
Return a reference to the current iterator element.
|
inline |
Access the current iterator element.
|
inline |
Remove the current element from the list.
This method calls the removeAtIndex() method of the iterated static array list, and therefore has an average time complexity of O(n/2) where n is the size of the array list.
|
inline |
Remove the current element from the list.
This method calls the removeAtIndexUnordered() method of the iterated static array list, and therefore has an average time complexity of O(1).
|
inline |
Reset the iterator to the beginning of the list.
|
inline |
Get the index of the next element to be iterated over.