Public Types | Public Member Functions | Private Attributes | Friends

LibGeoDecomp::FixedArray< T, SIZE > Class Template Reference

This is an alternative array with a fixed maximum size. More...

#include <fixedarray.h>

Collaboration diagram for LibGeoDecomp::FixedArray< T, SIZE >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T * iterator
typedef const T * const_iterator
typedef T value_type

Public Member Functions

 FixedArray (std::size_t elements=0)
 FixedArray (std::size_t elements, const T &value)
T & operator[] (const std::size_t &i)
const T & operator[] (const std::size_t &i) const
T * begin ()
const T * begin () const
T * end ()
const T * end () const
void push_back (const T &t)
FixedArray< T, SIZE > & operator<< (const T &t)
FixedArray< T, SIZE > & operator-= (const FixedArray< T, SIZE > &other)
FixedArray< T, SIZE > & operator+= (const FixedArray< T, SIZE > &other)
FixedArray< T, SIZE > operator- (const FixedArray< T, SIZE > &other) const
FixedArray< T, SIZE > operator+ (const FixedArray< T, SIZE > &other) const
template<typename F >
FixedArray< T, SIZE > & operator/= (F f)
template<typename F >
FixedArray< T, SIZE > & operator*= (F f)
template<typename F >
FixedArray< T, SIZE > operator/ (F f) const
template<typename F >
FixedArray< T, SIZE > operator* (F f) const
bool operator< (const FixedArray< T, SIZE > &other) const
bool operator> (const FixedArray< T, SIZE > &other) const
bool operator== (const FixedArray< T, SIZE > &other) const
void clear ()
void erase (T *elem)
void reserve (int num)
std::size_t size () const

Private Attributes

store [SIZE]
std::size_t elements

Friends

class Serialization
class Typemaps

Detailed Description

template<typename T, int SIZE>
class LibGeoDecomp::FixedArray< T, SIZE >

This is an alternative array with a fixed maximum size.

Good for use within objects which should not contain pointers (and are thus serializable by simply copying them bitwise), e.g. simulation cells.


Member Typedef Documentation

template<typename T, int SIZE>
typedef const T* LibGeoDecomp::FixedArray< T, SIZE >::const_iterator
template<typename T, int SIZE>
typedef T* LibGeoDecomp::FixedArray< T, SIZE >::iterator
template<typename T, int SIZE>
typedef T LibGeoDecomp::FixedArray< T, SIZE >::value_type

Constructor & Destructor Documentation

template<typename T, int SIZE>
LibGeoDecomp::FixedArray< T, SIZE >::FixedArray ( std::size_t  elements = 0  )  [inline, explicit]
template<typename T, int SIZE>
LibGeoDecomp::FixedArray< T, SIZE >::FixedArray ( std::size_t  elements,
const T &  value 
) [inline]

Member Function Documentation

template<typename T, int SIZE>
T* LibGeoDecomp::FixedArray< T, SIZE >::begin (  )  [inline]
template<typename T, int SIZE>
const T* LibGeoDecomp::FixedArray< T, SIZE >::begin (  )  const [inline]
template<typename T, int SIZE>
void LibGeoDecomp::FixedArray< T, SIZE >::clear (  )  [inline]
template<typename T, int SIZE>
T* LibGeoDecomp::FixedArray< T, SIZE >::end (  )  [inline]
template<typename T, int SIZE>
const T* LibGeoDecomp::FixedArray< T, SIZE >::end (  )  const [inline]
template<typename T, int SIZE>
void LibGeoDecomp::FixedArray< T, SIZE >::erase ( T *  elem  )  [inline]
template<typename T, int SIZE>
template<typename F >
FixedArray<T, SIZE> LibGeoDecomp::FixedArray< T, SIZE >::operator* ( f  )  const [inline]
template<typename T, int SIZE>
template<typename F >
FixedArray<T, SIZE>& LibGeoDecomp::FixedArray< T, SIZE >::operator*= ( f  )  [inline]
template<typename T, int SIZE>
FixedArray<T, SIZE> LibGeoDecomp::FixedArray< T, SIZE >::operator+ ( const FixedArray< T, SIZE > &  other  )  const [inline]
template<typename T, int SIZE>
FixedArray<T, SIZE>& LibGeoDecomp::FixedArray< T, SIZE >::operator+= ( const FixedArray< T, SIZE > &  other  )  [inline]
template<typename T, int SIZE>
FixedArray<T, SIZE> LibGeoDecomp::FixedArray< T, SIZE >::operator- ( const FixedArray< T, SIZE > &  other  )  const [inline]
template<typename T, int SIZE>
FixedArray<T, SIZE>& LibGeoDecomp::FixedArray< T, SIZE >::operator-= ( const FixedArray< T, SIZE > &  other  )  [inline]
template<typename T, int SIZE>
template<typename F >
FixedArray<T, SIZE> LibGeoDecomp::FixedArray< T, SIZE >::operator/ ( f  )  const [inline]
template<typename T, int SIZE>
template<typename F >
FixedArray<T, SIZE>& LibGeoDecomp::FixedArray< T, SIZE >::operator/= ( f  )  [inline]
template<typename T, int SIZE>
bool LibGeoDecomp::FixedArray< T, SIZE >::operator< ( const FixedArray< T, SIZE > &  other  )  const [inline]
template<typename T, int SIZE>
FixedArray<T, SIZE>& LibGeoDecomp::FixedArray< T, SIZE >::operator<< ( const T &  t  )  [inline]
template<typename T, int SIZE>
bool LibGeoDecomp::FixedArray< T, SIZE >::operator== ( const FixedArray< T, SIZE > &  other  )  const [inline]
template<typename T, int SIZE>
bool LibGeoDecomp::FixedArray< T, SIZE >::operator> ( const FixedArray< T, SIZE > &  other  )  const [inline]
template<typename T, int SIZE>
const T& LibGeoDecomp::FixedArray< T, SIZE >::operator[] ( const std::size_t &  i  )  const [inline]
template<typename T, int SIZE>
T& LibGeoDecomp::FixedArray< T, SIZE >::operator[] ( const std::size_t &  i  )  [inline]
template<typename T, int SIZE>
void LibGeoDecomp::FixedArray< T, SIZE >::push_back ( const T &  t  )  [inline]
template<typename T, int SIZE>
void LibGeoDecomp::FixedArray< T, SIZE >::reserve ( int  num  )  [inline]
template<typename T, int SIZE>
std::size_t LibGeoDecomp::FixedArray< T, SIZE >::size (  )  const [inline]

Friends And Related Function Documentation

template<typename T, int SIZE>
friend class Serialization [friend]
template<typename T, int SIZE>
friend class Typemaps [friend]

Member Data Documentation

template<typename T, int SIZE>
std::size_t LibGeoDecomp::FixedArray< T, SIZE >::elements [private]
template<typename T, int SIZE>
T LibGeoDecomp::FixedArray< T, SIZE >::store[SIZE] [private]

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