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

dolfin::Table< T > Class Template Reference

#include <Table.h>

Inheritance diagram for dolfin::Table< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Table ()
 Constructor.

 ~Table ()
 Destructor.

void clear ()
 Clear table.

T & create ()
 Create a new element in the table.

T & create (int &id)
 Create a new element in the table.

T & add (T x)
 Add an element to the table.

T & operator() (int id)
 Return element with given id.

void remove (T &x)
 Remove element at given address.

int size () const
 Return the size of the table.

bool empty () const
 Check if the table is empty.

Iterator begin () const
 Return an iterator positioned at the beginning of the table.

Iterator end () const
 Return an iterator positioned at the end of the table.

Iterator iterator (int id)
 Return an iterator positioned at the element with given id.


Friends

class Block
 Friends.

class Iterator
template<class X> LogStreamoperator<< (LogStream &stream, const Table< X > &table)
 Output.


Detailed Description

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

A Table is used to store large sets of data and is implemented as a block-linked list.

Elements can be dynamically added to (or removed from) the table. New blocks of size BLOCK_SIZE are allocated when needed.


Constructor & Destructor Documentation

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

Constructor.

template<class T>
dolfin::Table< T >::~Table  ) 
 

Destructor.


Member Function Documentation

template<class T>
T & dolfin::Table< T >::add x  ) 
 

Add an element to the table.

template<class T>
Table< T >::Iterator dolfin::Table< T >::begin  )  const
 

Return an iterator positioned at the beginning of the table.

template<class T>
void dolfin::Table< T >::clear  ) 
 

Clear table.

template<class T>
T & dolfin::Table< T >::create int &  id  ) 
 

Create a new element in the table.

template<class T>
T & dolfin::Table< T >::create  ) 
 

Create a new element in the table.

template<class T>
bool dolfin::Table< T >::empty  )  const
 

Check if the table is empty.

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

Return an iterator positioned at the end of the table.

template<class T>
Table< T >::Iterator dolfin::Table< T >::iterator int  id  ) 
 

Return an iterator positioned at the element with given id.

template<class T>
T & dolfin::Table< T >::operator() int  id  ) 
 

Return element with given id.

template<class T>
void dolfin::Table< T >::remove T &  x  ) 
 

Remove element at given address.

template<class T>
int dolfin::Table< T >::size  )  const
 

Return the size of the table.


Friends And Related Function Documentation

template<class T>
friend class Block [friend]
 

Friends.

template<class T>
friend class Iterator [friend]
 

template<class T>
template<class X>
LogStream& operator<< LogStream stream,
const Table< X > &  table
[friend]
 

Output.


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


Documentation automatically generated with Doxygen on 10 Sep 2004.