#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(); }
SAMRAI::tbox::ListIterator< TYPE >::ListIterator | ( | ) | [inline] |
Default constructor for ListIterator. This must be initialized before it can be used to iterate over a list.
SAMRAI::tbox::ListIterator< TYPE >::ListIterator | ( | const List< TYPE > & | list | ) | [inline] |
Create a list iterator pointing to the beginning of the specified list.
SAMRAI::tbox::ListIterator< TYPE >::ListIterator | ( | const ListIterator< TYPE > & | iterator | ) | [inline] |
Copy constructor for ListIterator. Make this iterator point to the same list and item as the argument.
SAMRAI::tbox::ListIterator< TYPE >::~ListIterator | ( | ) | [inline] |
Destructor for class ListIterator.
ListIterator< TYPE > & SAMRAI::tbox::ListIterator< TYPE >::operator= | ( | const ListIterator< TYPE > & | iterator | ) | [inline] |
Make the list iterator point to the same list and position as the argument.
TYPE & SAMRAI::tbox::ListIterator< TYPE >::operator * | ( | ) | [inline] |
Return the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf.
const TYPE & SAMRAI::tbox::ListIterator< TYPE >::operator * | ( | ) | const [inline] |
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.
TYPE & SAMRAI::tbox::ListIterator< TYPE >::operator() | ( | ) | [inline] |
Return the current item from the list. The iterator must point to a valid item in the list; otherwise, this function may barf.
const TYPE & SAMRAI::tbox::ListIterator< TYPE >::operator() | ( | ) | const [inline] |
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.
SAMRAI::tbox::ListIterator< TYPE >::operator bool | ( | ) | const [inline] |
Return true if the iterator points to a valid list item.
SAMRAI::tbox::ListIterator< TYPE >::operator const void * | ( | ) | const [inline] |
Return a non-NULL value if the iterator points to a valid list item.
bool SAMRAI::tbox::ListIterator< TYPE >::operator! | ( | ) | const [inline] |
Return whether the iterator points to a valid list item. This operator mimics the !p operation applied to a pointer p.
void SAMRAI::tbox::ListIterator< TYPE >::operator++ | ( | int | ) | [inline] |
Increment the iterator to point to the next element in the list.
void SAMRAI::tbox::ListIterator< TYPE >::operator-- | ( | int | ) | [inline] |
Decrement the iterator to point to the previous element in the list.
void SAMRAI::tbox::ListIterator< TYPE >::rewindIterator | ( | ) | [inline] |
Rewind the iterator to point to the first element in the list.
void SAMRAI::tbox::ListIterator< TYPE >::fastforwardIterator | ( | ) | [inline] |
Fast forward the iterator to point to the last element in the list.
bool SAMRAI::tbox::ListIterator< TYPE >::operator== | ( | const ListIterator< TYPE > & | iterator | ) | const [inline] |
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).
bool SAMRAI::tbox::ListIterator< TYPE >::operator!= | ( | const ListIterator< TYPE > & | iterator | ) | const [inline] |
Test two iterators for inequality (pointing to different list items). See the comments for operator== for more information about equality for list items.
friend class List< TYPE > [friend] |