#include <source/toolbox/base/List.h>
Public Member Functions | |
ListIterator () | |
ListIterator (const List< TYPE > &list) | |
ListIterator (const ListIterator< TYPE > &iterator) | |
ListIterator< TYPE > & | operator= (const ListIterator< TYPE > &iterator) |
~ListIterator () | |
TYPE & | operator * () |
const TYPE & | operator * () const |
TYPE & | operator() () |
const TYPE & | operator() () const |
operator bool () const | |
operator const void * () const | |
bool | operator! () const |
void | operator++ (int) |
void | operator-- (int) |
void | rewindIterator () |
void | fastforwardIterator () |
bool | operator== (const ListIterator< TYPE > &iterator) const |
bool | operator!= (const ListIterator< TYPE > &iterator) const |
Friends | |
class | List< TYPE > |
The list iterator should be used as follows:
List<TYPE> list; ... for (List<TYPE>::Iterator l(list); l; l++) { ... = l(); }
|
Default constructor for ListIterator. This must be initialized before it can be used to iterate over a list. |
|
Create a list iterator pointing to the beginning of the specified list. |
|
Copy constructor for ListIterator. Make this iterator point to the same list and item as the argument. |
|
Destructor for class ListIterator. |
|
Make the list iterator point to the same list and position as the argument. |
|
Return the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf. |
|
Return a const references to the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf. |
|
Return the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf. |
|
Return a const reference to the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf. |
|
Return true if the iterator points to a valid list item. |
|
Return a non-NULL value if the iterator points to a valid list item. |
|
Return whether the iterator points to a valid list item. This operator mimics the !p operation applied to a pointer p. |
|
Increment the iterator to point to the next element in the list. |
|
Decrement the iterator to point to the previous element in the list. |
|
Rewind the iterator to point to the first element in the list. |
|
Fast forward the iterator to point to the last element in the list. |
|
Test two iterators for equality (pointing to the same list item). This does not check whether two list items have the same value, but whether they are the same item. Thus, if a and b are iterators, "a == b" (object sameness) is more restrictive than "a() == b()" (object equality). |
|
Test two iterators for inequality (pointing to different list items). See the comments for operator== for more information about equality for list items. |
|
|