Dune::Array< T > Class Template Reference
[Common]

#include <array.hh>

List of all members.


Detailed Description

template<class T>
class Dune::Array< T >

A simple dynamic array class.


Public Types

typedef T MemberType
 export base type of array

Public Member Functions

Iterator begin () const
 Iterator interface.
Iterator end () const
 Iterator interface.
 Array ()
 Default constructor Creates an array of size 0.
 Array (int m)
 Constructor with size indicator Creates an empty array of size m.
 Array (const Array< T > &)
 copy constructor making shallow copy
 ~Array ()
 Destructor Deletes contents of array.
Array< T > & operator= (const Array< T > &)
 assignment of two arrays
Array< T > & operator= (const T &a)
 assign value to all components
void resize (int m)
 Resizing of an array Resizing causes the old array to be deleted. All data is lost!
void realloc (int m)
void swap (Array< T > &copy)
 just for some tests
int size () const
 return number of components in array
void set (const T &v)
 Sets all entries to the same value.
T & operator[] (int i)
 random access operator
const T & operator[] (int i) const
 Const random access operator.
void print (int k, std::string s, std::string row)
 Print contents of the array to cout.
bool processXdr (XDR *xdrs)

Classes

class  Iterator
 An iterator to access all components of array. More...

Member Function Documentation

template<class T>
void Dune::Array< T >::realloc ( int  m  )  [inline]

Todo:
This the same as resize!

template<class T>
void Dune::Array< T >::print ( int  k,
std::string  s,
std::string  row 
) [inline]

Print contents of the array to cout.

Parameters:
k Number of elements per printed row.
s Name of the array appearing in the first line.
row String being printed in each line.

template<class T>
bool Dune::Array< T >::processXdr ( XDR *  xdrs  )  [inline]

Todo:
Please doc me!


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

Generated on 9 Apr 2008 with Doxygen (ver 1.5.2) [logfile].