LocalArray Class Template Reference

Inheritance diagram for LocalArray:

FixedNdPoint FixedNdPoint< T, 1 > FixedNdPoint< T, 2 > FixedNdPoint< T, 3 > FixedNdPoint< T, 4 > FixedNdVector FixedNdVector< T, 1 > FixedNdVector< T, 2 > FixedNdVector< T, 3 > FixedNdVector< T, 4 > LocalRing List of all members.

Detailed Description

template<class T, int Size>
class LocalArray< T, Size >

Author:
Bill Smart

Version:
1.0
Date:
May 2005

Definition at line 44 of file LocalArray.H.

STL integration

typedef T value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typereference
typedef const value_typeconst_reference
typedef ptrdiff_t difference_type
typedef size_t size_type
typedef pointer iterator
typedef const_pointer const_iterator
typedef std::reverse_iterator<
iterator
reverse_iterator
typedef std::reverse_iterator<
const_iterator
const_reverse_iterator
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const

Public Member Functions

 LocalArray ()
 LocalArray (const T &value)
 LocalArray (const LocalArray< T, Size > &array)
 ~LocalArray ()
Assignment
LocalArray< T, Size > & operator= (const LocalArray< T, Size > &array)
 Assign one array to another.
LocalArray< T, Size > & operator= (const T &value)
 Assign a value to all elements of the array.
Element access
reference operator[] (const size_type index)
const_reference operator[] (const size_type index) const
reference operator() (const size_type index)
const_reference operator() (const size_type index) const
Sizes
size_type size () const

Private Attributes

m_data [Size]


Member Typedef Documentation

typedef T value_type

Reimplemented in LocalRing.

Definition at line 74 of file LocalArray.H.

typedef value_type* pointer

Reimplemented in LocalRing.

Definition at line 76 of file LocalArray.H.

typedef const value_type* const_pointer

Reimplemented in LocalRing.

Definition at line 77 of file LocalArray.H.

typedef value_type& reference

Reimplemented in LocalRing.

Definition at line 78 of file LocalArray.H.

typedef const value_type& const_reference

Reimplemented in LocalRing.

Definition at line 79 of file LocalArray.H.

typedef ptrdiff_t difference_type

Reimplemented in LocalRing.

Definition at line 81 of file LocalArray.H.

typedef size_t size_type

Reimplemented in LocalRing.

Definition at line 82 of file LocalArray.H.

typedef pointer iterator

Reimplemented in LocalRing.

Definition at line 84 of file LocalArray.H.

typedef const_pointer const_iterator

Reimplemented in LocalRing.

Definition at line 85 of file LocalArray.H.

typedef std::reverse_iterator<iterator> reverse_iterator

Reimplemented in LocalRing.

Definition at line 93 of file LocalArray.H.

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Reimplemented in LocalRing.

Definition at line 94 of file LocalArray.H.


Constructor & Destructor Documentation

LocalArray (  )  [inline]

Allocate an array.

Definition at line 47 of file LocalArray.H.

LocalArray ( const T &  value  )  [inline]

Allocate an array, and initialize each element to a particular value.

Parameters:
[in] value The initial value for each element.

Definition at line 50 of file LocalArray.H.

LocalArray ( const LocalArray< T, Size > &  array  )  [inline]

Definition at line 52 of file LocalArray.H.

~LocalArray (  )  [inline]

Definition at line 54 of file LocalArray.H.


Member Function Documentation

LocalArray<T, Size>& operator= ( const LocalArray< T, Size > &  array  )  [inline]

Assign one array to another.

If the array being assigned from is larger than the array being assigned to, data block holding the array will be deleted and reallocated.

Parameters:
[in] array The array to be assigned from.
Returns:
A reference to the modified array.

Definition at line 63 of file LocalArray.H.

LocalArray<T, Size>& operator= ( const T &  value  )  [inline]

Assign a value to all elements of the array.

Parameters:
[in] value The value to be assigned.
Returns:
A reference to the modified array.

Definition at line 68 of file LocalArray.H.

iterator begin (  )  [inline]

Definition at line 87 of file LocalArray.H.

Referenced by LocalArray< double, Size >::rend().

iterator end (  )  [inline]

Definition at line 88 of file LocalArray.H.

Referenced by LocalArray< double, Size >::rbegin().

const_iterator begin (  )  const [inline]

Definition at line 90 of file LocalArray.H.

const_iterator end (  )  const [inline]

Definition at line 91 of file LocalArray.H.

reverse_iterator rbegin (  )  [inline]

Definition at line 96 of file LocalArray.H.

reverse_iterator rend (  )  [inline]

Definition at line 97 of file LocalArray.H.

const_reverse_iterator rbegin (  )  const [inline]

Definition at line 99 of file LocalArray.H.

const_reverse_iterator rend (  )  const [inline]

Definition at line 100 of file LocalArray.H.

reference operator[] ( const size_type  index  )  [inline]

Reimplemented in LocalRing.

Definition at line 105 of file LocalArray.H.

const_reference operator[] ( const size_type  index  )  const [inline]

Reimplemented in LocalRing.

Definition at line 106 of file LocalArray.H.

reference operator() ( const size_type  index  )  [inline]

Reimplemented in LocalRing.

Definition at line 108 of file LocalArray.H.

Referenced by Fixed1dPoint::Fixed1dPoint(), Fixed1dVector::Fixed1dVector(), Fixed2dPoint::Fixed2dPoint(), Fixed2dVector::Fixed2dVector(), Fixed3dPoint::Fixed3dPoint(), Fixed3dVector::Fixed3dVector(), Fixed4dPoint::Fixed4dPoint(), Fixed4dVector::Fixed4dVector(), Fixed4dVector::t(), Fixed4dPoint::t(), Fixed4dVector::x(), Fixed4dPoint::x(), Fixed3dVector::x(), Fixed3dPoint::x(), Fixed2dVector::x(), Fixed2dPoint::x(), Fixed1dVector::x(), Fixed1dPoint::x(), Fixed4dVector::y(), Fixed4dPoint::y(), Fixed3dVector::y(), Fixed3dPoint::y(), Fixed2dVector::y(), Fixed2dPoint::y(), Fixed4dVector::z(), Fixed4dPoint::z(), Fixed3dVector::z(), and Fixed3dPoint::z().

const_reference operator() ( const size_type  index  )  const [inline]

Reimplemented in LocalRing.

Definition at line 109 of file LocalArray.H.

size_type size (  )  const [inline]

Definition at line 114 of file LocalArray.H.

Referenced by LocalRing::wrap_index().


Member Data Documentation

T m_data[Size] [private]

Definition at line 118 of file LocalArray.H.

Referenced by LocalArray< double, Size >::begin(), LocalArray< double, Size >::end(), LocalArray< double, Size >::LocalArray(), LocalArray< double, Size >::operator()(), LocalArray< double, Size >::operator=(), and LocalArray< double, Size >::operator[]().


The documentation for this class was generated from the following file:
Generated on Thu Feb 1 15:31:55 2007 for WURDE by  doxygen 1.5.1