Iterator for the list.
More...
#include <csutil/list.h>
List of all members.
Public Member Functions |
void | Clear () |
| Set iterator to non-existent element. HasCurrent() will return false.
|
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.
|
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.
|
| Iterator () |
| Constructor.
|
| Iterator (const Iterator &r) |
| Copy constructor.
|
| Iterator (const csList< T, MemoryAllocator > &list, bool reverse=false) |
| Constructor.
|
T & | Next () |
| Advance to next element and return it.
|
| operator T * () const |
| Cast operator.
|
T & | operator* () const |
| Dereference operator (*).
|
Iterator & | operator++ () |
| Advance to next element and return it.
|
Iterator & | operator-- () |
| Backup to previous element and return it.
|
T * | operator-> () const |
| Dereference operator (->).
|
Iterator & | operator= (const Iterator &r) |
| Assignment operator.
|
T & | Previous () |
| Backup to previous element and return it.
|
Friends |
class | csList< T, MemoryAllocator > |
Detailed Description
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
class csList< T, MemoryAllocator >::Iterator
Iterator for the list.
Definition at line 94 of file list.h.
Constructor & Destructor Documentation
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Constructor.
Definition at line 98 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Copy constructor.
Definition at line 101 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Constructor.
Definition at line 104 of file list.h.
Member Function Documentation
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Set iterator to non-existent element. HasCurrent() will return false.
Definition at line 143 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Return current element.
Warning! Assumes there is a current element!
Definition at line 189 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Return next element but don't modify iterator.
Warning! Assumes there is a next element!
Definition at line 198 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Return previous element but don't modify iterator.
Warning! Assumes there is a previous element!
Definition at line 207 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if the Iterator is set to a valid element.
Definition at line 114 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if there is a next element.
Definition at line 117 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if there is a previous element.
Definition at line 120 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if the Iterator is set to the first element.
Definition at line 123 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if the Iterator is set to the last element.
Definition at line 126 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Test if the iterator is reversed.
Definition at line 129 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Advance to next element and return it.
Definition at line 149 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
csList< T, MemoryAllocator >::Iterator::operator T * |
( |
| ) |
const [inline] |
Cast operator.
Definition at line 133 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T& csList< T, MemoryAllocator >::Iterator::operator* |
( |
| ) |
const [inline] |
Dereference operator (*).
Definition at line 136 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Iterator& csList< T, MemoryAllocator >::Iterator::operator++ |
( |
| ) |
[inline] |
Advance to next element and return it.
Definition at line 169 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Iterator& csList< T, MemoryAllocator >::Iterator::operator-- |
( |
| ) |
[inline] |
Backup to previous element and return it.
Definition at line 177 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T* csList< T, MemoryAllocator >::Iterator::operator-> |
( |
| ) |
const [inline] |
Dereference operator (->).
Definition at line 139 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Assignment operator.
Definition at line 111 of file list.h.
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
Backup to previous element and return it.
Definition at line 158 of file list.h.
The documentation for this class was generated from the following file: