Array< Elem, Size > Class Template Reference

#include <Array.h>

Inheritance diagram for Array< Elem, Size >:

MathArray< Elem, Size > List of all members.

Public Types

typedef Elem * iterator
typedef const Elem * const_iterator

Public Member Functions

 Array (void)
 ~Array (void)
 Array (const Array< Elem, Size > &a2)
Array< Elem, Size > & operator= (const Array< Elem, Size > &a2)
 Array (const Elem &v)
Array< Elem, Size > & operator= (const Elem &v)
Elem & operator[] (int index)
const Elem & operator[] (int index) const
iterator begin (void)
iterator end (void)
const_iterator const_begin (void) const
const_iterator const_end (void) const

Public Attributes

Elem data [Size]

Detailed Description

template<class Elem, int Size>
class Array< Elem, Size >

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 10 of file Array.h.


Member Typedef Documentation

template<class Elem, int Size>
typedef const Elem* Array< Elem, Size >::const_iterator

Definition at line 49 of file Array.h.

template<class Elem, int Size>
typedef Elem* Array< Elem, Size >::iterator

Definition at line 46 of file Array.h.


Constructor & Destructor Documentation

template<class Elem, int Size>
Array< Elem, Size >::Array ( void   )  [inline]

Definition at line 16 of file Array.h.

00016 { ; }

template<class Elem, int Size>
Array< Elem, Size >::~Array ( void   )  [inline]

Definition at line 19 of file Array.h.

00019 { ; }

template<class Elem, int Size>
Array< Elem, Size >::Array ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 22 of file Array.h.

References Array< Elem, Size >::data.

00022                                       {
00023       for ( int i = 0; i < Size; ++i ) { data[i] = a2.data[i]; }
00024     }

template<class Elem, int Size>
Array< Elem, Size >::Array ( const Elem &  v  )  [inline]

Definition at line 33 of file Array.h.

References Array< Elem, Size >::data.

00033                          {
00034       for ( int i = 0; i < Size; ++i ) { data[i] = v; }
00035     }


Member Function Documentation

template<class Elem, int Size>
iterator Array< Elem, Size >::begin ( void   )  [inline]

Definition at line 47 of file Array.h.

References Array< Elem, Size >::data.

Referenced by OptPmeXPencil::submit_evir().

00047 { return &data[0]; }

template<class Elem, int Size>
const_iterator Array< Elem, Size >::const_begin ( void   )  const [inline]

Definition at line 50 of file Array.h.

References Array< Elem, Size >::data.

00050 { return &data[0]; }

template<class Elem, int Size>
const_iterator Array< Elem, Size >::const_end ( void   )  const [inline]

Definition at line 51 of file Array.h.

References Array< Elem, Size >::data.

00051 { return &data[0] + Size; }

template<class Elem, int Size>
iterator Array< Elem, Size >::end ( void   )  [inline]

Definition at line 48 of file Array.h.

References Array< Elem, Size >::data.

00048 { return &data[0] + Size; }

template<class Elem, int Size>
Array<Elem,Size>& Array< Elem, Size >::operator= ( const Elem &  v  )  [inline]

Reimplemented in MathArray< Elem, Size >.

Definition at line 36 of file Array.h.

References Array< Elem, Size >::data.

00036                                                  {
00037       for ( int i = 0; i < Size; ++i ) { data[i] = v; }
00038       return (*this);
00039     }

template<class Elem, int Size>
Array<Elem,Size>& Array< Elem, Size >::operator= ( const Array< Elem, Size > &  a2  )  [inline]

Reimplemented in MathArray< Elem, Size >.

Definition at line 27 of file Array.h.

References Array< Elem, Size >::data.

Referenced by MathArray< Elem, Size >::operator=().

00027                                                               {
00028       for ( int i = 0; i < Size; ++i ) { data[i] = a2.data[i]; }
00029       return (*this);
00030     }

template<class Elem, int Size>
const Elem& Array< Elem, Size >::operator[] ( int  index  )  const [inline]

Definition at line 43 of file Array.h.

References Array< Elem, Size >::data.

00043 { return data[index]; }

template<class Elem, int Size>
Elem& Array< Elem, Size >::operator[] ( int  index  )  [inline]

Definition at line 42 of file Array.h.

References Array< Elem, Size >::data.

00042 { return data[index]; }


Member Data Documentation

template<class Elem, int Size>
Elem Array< Elem, Size >::data[Size]

Definition at line 13 of file Array.h.

Referenced by Array< Elem, Size >::Array(), Array< Elem, Size >::begin(), Array< Elem, Size >::const_begin(), Array< Elem, Size >::const_end(), Array< Elem, Size >::end(), MathArray< Elem, Size >::operator *=(), MathArray< Elem, Size >::operator+=(), MathArray< Elem, Size >::operator-=(), MathArray< Elem, Size >::operator/=(), Array< Elem, Size >::operator=(), and Array< Elem, Size >::operator[]().


The documentation for this class was generated from the following file:
Generated on Sun Sep 24 01:17:16 2017 for NAMD by  doxygen 1.4.7