CrystalSpace

Public API Reference

csList< T, MemoryAllocator >::Iterator Class Reference

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 (const csList< T, MemoryAllocator > &list, bool reverse=false)
 Constructor.
 Iterator (const Iterator &r)
 Copy constructor.
 Iterator ()
 Constructor.
T & Next ()
 Advance to next element and return it.
 operator T * () const
 Cast operator.
T & operator* () const
 Dereference operator (*).
Iteratoroperator++ ()
 Advance to next element and return it.
Iteratoroperator-- ()
 Backup to previous element and return it.
T * operator-> () const
 Dereference operator (->).
Iteratoroperator= (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>
csList< T, MemoryAllocator >::Iterator::Iterator (  )  [inline]

Constructor.

Definition at line 98 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
csList< T, MemoryAllocator >::Iterator::Iterator ( const Iterator r  )  [inline]

Copy constructor.

Definition at line 101 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
csList< T, MemoryAllocator >::Iterator::Iterator ( const csList< T, MemoryAllocator > &  list,
bool  reverse = false 
) [inline]

Constructor.

Definition at line 104 of file list.h.


Member Function Documentation

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
void csList< T, MemoryAllocator >::Iterator::Clear (  )  [inline]

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>
T& csList< T, MemoryAllocator >::Iterator::FetchCurrent (  )  const [inline]

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>
T& csList< T, MemoryAllocator >::Iterator::FetchNext (  )  const [inline]

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>
T& csList< T, MemoryAllocator >::Iterator::FetchPrevious (  )  const [inline]

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>
bool csList< T, MemoryAllocator >::Iterator::HasCurrent (  )  const [inline]

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>
bool csList< T, MemoryAllocator >::Iterator::HasNext (  )  const [inline]

Test if there is a next element.

Definition at line 117 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
bool csList< T, MemoryAllocator >::Iterator::HasPrevious (  )  const [inline]

Test if there is a previous element.

Definition at line 120 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
bool csList< T, MemoryAllocator >::Iterator::IsFirst (  )  const [inline]

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>
bool csList< T, MemoryAllocator >::Iterator::IsLast (  )  const [inline]

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>
bool csList< T, MemoryAllocator >::Iterator::IsReverse (  )  const [inline]

Test if the iterator is reversed.

Definition at line 129 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T& csList< T, MemoryAllocator >::Iterator::Next (  )  [inline]

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>
Iterator& csList< T, MemoryAllocator >::Iterator::operator= ( const Iterator r  )  [inline]

Assignment operator.

Definition at line 111 of file list.h.

template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T& csList< T, MemoryAllocator >::Iterator::Previous (  )  [inline]

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:

Generated for Crystal Space 2.0 by doxygen 1.6.1