Tuple< T, N > Class Template Reference

: Ordered Tuples for Types T More...

#include <Tuple.H>

Collaboration diagram for Tuple< T, N >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Tuple ()
 The default constructor.
 Tuple (const T *v)
 Constructs a Tuple, initializing the elements in the Tuple with the corresponding elements in the vector v.
 Tuple (const Tuple &rhs)
Tupleoperator= (const Tuple &rhs)
T & operator[] (int i)
 Returns a reference to the i'th element in the Tuple, counting from zero.
const T & operator[] (int i) const
 Returns a constant reference to the i'th element in the Tuple, counting from zero.
 operator const T * () const
 Returns the address of the underlying vector of T representation.

Protected Attributes

vect [N]


Detailed Description

template<class T, size_t N>
class Tuple< T, N >

: Ordered Tuples for Types T

This class represents ordered tuples of some user-specified concrete type T for N > 0. The type T must have a default constructor. If the non-default constructor, copy constructor, or copy assignment operator are used, T must also have a copy constructor.


Constructor & Destructor Documentation

template<class T, size_t N>
Tuple< T, N >::Tuple (  )  [inline]

The default constructor.

For user-defined types T, the default constructor for T will be run on each of the N objects in the Tuple. For builtin (intrinsic) types, the values in the Tuple will be garbage.

template<class T, size_t N>
Tuple< T, N >::Tuple ( const T *  v  )  [inline, explicit]

Constructs a Tuple, initializing the elements in the Tuple with the corresponding elements in the vector v.

This assumes that v contains at least N elements of type T -- an assumption that is NOT checked. For user-defined types, T must have a well-defined and accessible copy constructor.

References BL_ASSERT, and Tuple< T, N >::vect.

template<class T, size_t N>
Tuple< T, N >::Tuple ( const Tuple< T, N > &  rhs  )  [inline]

References Tuple< T, N >::vect.


Member Function Documentation

template<class T, size_t N>
Tuple< T, N > & Tuple< T, N >::operator= ( const Tuple< T, N > &  rhs  )  [inline]

References Tuple< T, N >::vect.

template<class T, size_t N>
T & Tuple< T, N >::operator[] ( int  i  )  [inline]

Returns a reference to the i'th element in the Tuple, counting from zero.

Performs range checking when the library is compiled in debug mode.

References BL_ASSERT, and Tuple< T, N >::vect.

template<class T, size_t N>
const T & Tuple< T, N >::operator[] ( int  i  )  const [inline]

Returns a constant reference to the i'th element in the Tuple, counting from zero.

Performs range checking when the library is compiled in debug mode.

References BL_ASSERT, and Tuple< T, N >::vect.

template<class T, size_t N>
Tuple< T, N >::operator const T * (  )  const [inline]

Returns the address of the underlying vector of T representation.

This should ONLY be used when interfacing to Fortran as it breaks the encapsulation of the class.

References Tuple< T, N >::vect.


Member Data Documentation

template<class T, size_t N>
T Tuple< T, N >::vect[N] [protected]


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

Generated on Fri Nov 21 10:11:03 2008 for AMRParticlePaths by  doxygen 1.5.5