csList< T >::Iterator Class Reference
Iterator for the list. More...
#include <csutil/list.h>
Public Member Functions | |
Iterator () | |
Constructor. | |
Iterator (const Iterator &r) | |
Copy constructor. | |
Iterator (const csList< T > &list, bool reverse=false) | |
Constructor. | |
Iterator & | operator= (const Iterator &r) |
Assignment operator. | |
bool | HasCurrent () const |
Test if the Iterator is set to a valid element. | |
bool | HasNext () const |
Test if there is a next element. | |
bool | HasPrevious () const |
Test if there is a previous element. | |
bool | IsFirst () const |
Test if the Iterator is set to the first element. | |
bool | IsLast () const |
Test if the Iterator is set to the last element. | |
bool | IsReverse () const |
Test if the iterator is reversed. | |
operator T * () const | |
Cast operator. | |
T & | operator * () const |
Dereference operator (*). | |
T * | operator-> () const |
Dereference operator (->). | |
void | Clear () |
Set iterator to non-existent element. HasCurrent() will return false. | |
T & | Next () |
Advance to next element and return it. | |
T & | Previous () |
Backup to previous element and return it. | |
Iterator & | operator++ () |
Advance to next element and return it. | |
Iterator & | operator-- () |
Backup to previous element and return it. | |
T & | FetchCurrent () const |
Return current element. | |
T & | FetchNext () const |
Return next element but don't modify iterator. | |
T & | FetchPrevious () const |
Return previous element but don't modify iterator. |
Detailed Description
template<class T>
class csList< T >::Iterator
Iterator for the list.
Definition at line 68 of file list.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Copy constructor.
Definition at line 75 of file list.h. References csList< T >::Iterator::ptr, csList< T >::Iterator::reversed, and csList< T >::Iterator::visited. |
|
Constructor.
Definition at line 78 of file list.h. References csList< T >::head, and csList< T >::tail. |
Member Function Documentation
|
Set iterator to non-existent element. HasCurrent() will return false.
|
|
Return current element. Warning! Assumes there is a current element! |
|
Return next element but don't modify iterator. Warning! Assumes there is a next element! |
|
Return previous element but don't modify iterator. Warning! Assumes there is a previous element! |
|
Test if the Iterator is set to a valid element.
Definition at line 88 of file list.h. Referenced by csList< T >::Delete(), csList< T >::InsertAfter(), csList< T >::InsertBefore(), csList< T >::MoveAfter(), and csList< T >::MoveBefore(). |
|
Test if there is a next element.
|
|
Test if there is a previous element.
|
|
Test if the Iterator is set to the first element.
|
|
Test if the Iterator is set to the last element.
|
|
Test if the iterator is reversed.
Definition at line 103 of file list.h. Referenced by csList< T >::Delete(). |
|
Advance to next element and return it.
|
|
Dereference operator (*).
|
|
Cast operator.
|
|
Advance to next element and return it.
|
|
Backup to previous element and return it.
|
|
Dereference operator (->).
|
|
Assignment operator.
Definition at line 85 of file list.h. References csList< T >::Iterator::ptr, csList< T >::Iterator::reversed, and csList< T >::Iterator::visited. |
|
Backup to previous element and return it.
|
The documentation for this class was generated from the following file:
- csutil/list.h
Generated for Crystal Space by doxygen 1.3.9.1