Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

dolfin::List< T >::Iterator Class Reference

#include <List.h>

List of all members.

Public Member Functions

 Iterator (List< T > &list)
 Create iterator positioned at the beginning of the list.

 Iterator (const Iterator &it)
 Copy constructor.

int index () const
 Current position in the list.

Iteratoroperator++ ()
 Prefix increment.

bool end () const
 Check if iterator has reached end of the list.

bool last () const
 Check if iterator has reached the last element.

T & operator * () const
 Return current element.

T * operator-> () const
 Pointer mechanism.

 operator T * () const
 Cast to pointer to current element.

T * pointer () const
 Returns pointer to current element.

void operator= (const Iterator &it)
 Assignment.

bool operator== (const Iterator &it) const
 Equality operator.

bool operator!= (const Iterator &it) const
 Inequality operator.


Detailed Description

template<class T>
class dolfin::List< T >::Iterator

Iterator for the List class. Should be used as follows:

for (List<T>::Iterator it(list); !it.end(); ++it) { it->...(); }


Constructor & Destructor Documentation

template<class T>
dolfin::List< T >::Iterator::Iterator List< T > &  list  ) 
 

Create iterator positioned at the beginning of the list.

template<class T>
dolfin::List< T >::Iterator::Iterator const Iterator it  ) 
 

Copy constructor.


Member Function Documentation

template<class T>
bool dolfin::List< T >::Iterator::end  )  const
 

Check if iterator has reached end of the list.

template<class T>
int dolfin::List< T >::Iterator::index  )  const
 

Current position in the list.

template<class T>
bool dolfin::List< T >::Iterator::last  )  const
 

Check if iterator has reached the last element.

template<class T>
T & dolfin::List< T >::Iterator::operator *  )  const
 

Return current element.

template<class T>
dolfin::List< T >::Iterator::operator T *  )  const
 

Cast to pointer to current element.

template<class T>
bool dolfin::List< T >::Iterator::operator!= const Iterator it  )  const
 

Inequality operator.

template<class T>
List< T >::Iterator & dolfin::List< T >::Iterator::operator++  ) 
 

Prefix increment.

template<class T>
T * dolfin::List< T >::Iterator::operator->  )  const
 

Pointer mechanism.

template<class T>
void dolfin::List< T >::Iterator::operator= const Iterator it  ) 
 

Assignment.

template<class T>
bool dolfin::List< T >::Iterator::operator== const Iterator it  )  const
 

Equality operator.

template<class T>
T * dolfin::List< T >::Iterator::pointer  )  const
 

Returns pointer to current element.


The documentation for this class was generated from the following file:


Documentation automatically generated with Doxygen on 10 Sep 2004.