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

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

#include <Table.h>

List of all members.

Public Member Functions

 Iterator ()
 Create iterator positioned at the end of the table.

 Iterator (const Iterator &it)
 Copy constructor.

 Iterator (const Table< T > &table)
 Create iterator positioned at the beginning of the table.

 Iterator (const Table< T > &table, int id)
 Create iterator positioned at the element with given id.

int index () const
 Current position in the table.

Iterator & operator++ ()
 Prefix increment.

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

bool last () const
 Check if iterator is at the last position.

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.


Friends

class Table< T >
 Friends.


Detailed Description

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

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

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


Constructor & Destructor Documentation

template<class T>
dolfin::Table< T >::Iterator::Iterator (   ) 
 

Create iterator positioned at the end of the table.

template<class T>
dolfin::Table< T >::Iterator::Iterator (  const Iterator &  it  ) 
 

Copy constructor.

template<class T>
dolfin::Table< T >::Iterator::Iterator (  const Table< T > &  table  ) 
 

Create iterator positioned at the beginning of the table.

template<class T>
dolfin::Table< T >::Iterator::Iterator (  const Table< T > &  table,
int  id
) 
 

Create iterator positioned at the element with given id.


Member Function Documentation

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

Check if iterator has reached end of the table.

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

Current position in the table.

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

Check if iterator is at the last position.

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

Return current element.

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

Cast to pointer to current element.

template<class T>
bool dolfin::Table< T >::Iterator::operator!= (  const Iterator &  it  )  const
 

Inequality operator.

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

Prefix increment.

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

Pointer mechanism.

template<class T>
void dolfin::Table< T >::Iterator::operator= (  const Iterator &  it  ) 
 

Assignment.

template<class T>
bool dolfin::Table< T >::Iterator::operator== (  const Iterator &  it  )  const
 

Equality operator.

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

Returns pointer to current element.


Friends And Related Function Documentation

template<class T>
friend class Table< T > [friend]
 

Friends.


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


Documentation automatically generated with Doxygen on 10 Sep 2004.