CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csList< T >::Iterator Class Reference

Iterator for the list. More...

#include <list.h>

List of all members.

Public Methods

 Iterator ()
 Constructor.

 Iterator (const Iterator &other)
 Copy constructor.

 Iterator (const csList< T > &list, bool reverse=false)
 Constructor.

const Iterator & operator= (const Iterator &other)
 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 * Prev ()
 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.


Detailed Description

template<class T>
class csList< T >::Iterator

Iterator for the list.

Definition at line 68 of file list.h.


Constructor & Destructor Documentation

template<class T>
csList< T >::Iterator::Iterator   [inline]
 

Constructor.

Definition at line 72 of file list.h.

template<class T>
csList< T >::Iterator::Iterator const Iterator &    other [inline]
 

Copy constructor.

Definition at line 75 of file list.h.

References csList< T >::Iterator::ptr.

template<class T>
csList< T >::Iterator::Iterator const csList< T > &    list,
bool    reverse = false
[inline]
 

Constructor.

Definition at line 78 of file list.h.

References csList< T >::head, and csList< T >::tail.


Member Function Documentation

template<class T>
void csList< T >::Iterator::Clear   [inline]
 

Set iterator to non-existent element. HasCurrent() will return false.

Definition at line 117 of file list.h.

template<class T>
bool csList< T >::Iterator::HasCurrent   const [inline]
 

Test if the Iterator is set to a valid element.

Definition at line 88 of file list.h.

template<class T>
bool csList< T >::Iterator::HasNext   const [inline]
 

Test if there is a next element.

Definition at line 91 of file list.h.

References csList< T >::csListElement::next.

template<class T>
bool csList< T >::Iterator::HasPrevious   const [inline]
 

Test if there is a previous element.

Definition at line 94 of file list.h.

References csList< T >::csListElement::prev.

template<class T>
bool csList< T >::Iterator::IsFirst   const [inline]
 

Test if the Iterator is set to the first element.

Definition at line 97 of file list.h.

References csList< T >::csListElement::prev.

template<class T>
bool csList< T >::Iterator::IsLast   const [inline]
 

Test if the Iterator is set to the last element.

Definition at line 100 of file list.h.

References csList< T >::csListElement::next.

template<class T>
bool csList< T >::Iterator::IsReverse   const [inline]
 

Test if the iterator is reversed.

Definition at line 103 of file list.h.

Referenced by csList< T >::Delete().

template<class T>
T* csList< T >::Iterator::Next   [inline]
 

Advance to next element and return it.

Definition at line 122 of file list.h.

References csList< T >::csListElement::next.

template<class T>
T& csList< T >::Iterator::operator *   const [inline]
 

Dereference operator (*).

Definition at line 110 of file list.h.

References csList< T >::csListElement::data.

template<class T>
csList< T >::Iterator::operator T *   const [inline]
 

Cast operator.

Definition at line 107 of file list.h.

References csList< T >::csListElement::data.

template<class T>
Iterator& csList< T >::Iterator::operator++   [inline]
 

Advance to next element and return it.

Definition at line 136 of file list.h.

References csList< T >::csListElement::next.

template<class T>
Iterator& csList< T >::Iterator::operator--   [inline]
 

Backup to previous element and return it.

Definition at line 143 of file list.h.

References csList< T >::csListElement::prev.

template<class T>
T* csList< T >::Iterator::operator->   const [inline]
 

Dereference operator (->).

Definition at line 113 of file list.h.

References csList< T >::csListElement::data.

template<class T>
const Iterator& csList< T >::Iterator::operator= const Iterator &    other [inline]
 

Assignment operator.

Definition at line 85 of file list.h.

References csList< T >::Iterator::ptr, and csList< T >::Iterator::reversed.

template<class T>
T* csList< T >::Iterator::Prev   [inline]
 

Backup to previous element and return it.

Definition at line 129 of file list.h.

References csList< T >::csListElement::prev.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18