Simple Application Framework
1
|
Class representing a static array of N elements of the same data type. More...
#include <StaticArray.h>
Public Types | |
typedef const T * | ConstIterator |
typedef T * | Iterator |
Public Member Functions | |
StaticArray () | |
Constructor. | |
StaticArray (const T &val) | |
Constructor. | |
StaticArray (const T &v1, const T &v2) | |
Constructor applicable to arrays of 2 elements. | |
StaticArray (const T &v1, const T &v2, const T &v3) | |
Constructor applicable to arrays of 3 elements. | |
StaticArray (const T &v1, const T &v2, const T &v3, const T &v4) | |
Constructor applicable to arrays of 4 elements. | |
StaticArray (const MyType &t) | |
Copy constructor. | |
Iterator | Back () |
Iterator to the last element. | |
ConstIterator | Back () const |
Iterator to the last element. | |
Iterator | Begin () |
Iterator to the first element. | |
ConstIterator | Begin () const |
Iterator to the first element. | |
Size | Elements () const |
Get the size of the array. | |
Iterator | End () |
Iterator one after the last element. | |
ConstIterator | End () const |
Iterator one after the last element. | |
Iterator | Front () |
Iterator to the first element. | |
ConstIterator | Front () const |
Iterator to the first element. | |
bool | operator!= (const MyType &t) const |
Not equal to operator. | |
MyType & | operator= (const MyType &t) |
Assignment operator. | |
bool | operator== (const MyType &t) const |
Equal to operator. | |
const T & | operator[] (Size i) const |
Subscript operator. | |
T & | operator[] (Size i) |
Subscript operator. | |
MyType & | Set (const T &v1, const T &v2) |
Set the values of elements in an array of size 2. | |
MyType & | Set (const T &v1, const T &v2, const T &v3) |
Set the values of elements in an array of size 3. | |
MyType & | Set (const T &v1, const T &v2, const T &v3, const T &v4) |
Set the values of elements in an array of size 4. | |
Protected Types | |
typedef StaticArray< N, T > | MyType |
Protected Attributes | |
T | m_data [N] |
Data container. |
Class representing a static array of N elements of the same data type.
The size of the array cannot be changed during its lifetime. However, its possible to freely access the individual elements and change their values.
N | Number of elements (size of the array). |
T | Data type. |
typedef const T* Saf::Collection::StaticArray< N, T >::ConstIterator |
typedef T* Saf::Collection::StaticArray< N, T >::Iterator |
typedef StaticArray<N,T> Saf::Collection::StaticArray< N, T >::MyType [protected] |
Saf::Collection::StaticArray< N, T >::StaticArray | ( | ) | [inline] |
Constructor.
All elements are initialized using their default constructor.
Saf::Collection::StaticArray< N, T >::StaticArray | ( | const T & | val | ) | [inline, explicit] |
Constructor.
Initializes all elements with a value val
.
Saf::Collection::StaticArray< N, T >::StaticArray | ( | const T & | v1, |
const T & | v2 | ||
) | [inline] |
Constructor applicable to arrays of 2 elements.
Saf::Collection::StaticArray< N, T >::StaticArray | ( | const T & | v1, |
const T & | v2, | ||
const T & | v3 | ||
) | [inline] |
Constructor applicable to arrays of 3 elements.
Saf::Collection::StaticArray< N, T >::StaticArray | ( | const T & | v1, |
const T & | v2, | ||
const T & | v3, | ||
const T & | v4 | ||
) | [inline] |
Constructor applicable to arrays of 4 elements.
Saf::Collection::StaticArray< N, T >::StaticArray | ( | const MyType & | t | ) | [inline] |
Copy constructor.
Iterator Saf::Collection::StaticArray< N, T >::Back | ( | ) | [inline] |
Iterator to the last element.
ConstIterator Saf::Collection::StaticArray< N, T >::Back | ( | ) | const [inline] |
Iterator to the last element.
Iterator Saf::Collection::StaticArray< N, T >::Begin | ( | ) | [inline] |
Iterator to the first element.
ConstIterator Saf::Collection::StaticArray< N, T >::Begin | ( | ) | const [inline] |
Iterator to the first element.
Size Saf::Collection::StaticArray< N, T >::Elements | ( | ) | const [inline] |
Get the size of the array.
Iterator Saf::Collection::StaticArray< N, T >::End | ( | ) | [inline] |
Iterator one after the last element.
ConstIterator Saf::Collection::StaticArray< N, T >::End | ( | ) | const [inline] |
Iterator one after the last element.
Iterator Saf::Collection::StaticArray< N, T >::Front | ( | ) | [inline] |
Iterator to the first element.
ConstIterator Saf::Collection::StaticArray< N, T >::Front | ( | ) | const [inline] |
Iterator to the first element.
bool Saf::Collection::StaticArray< N, T >::operator!= | ( | const MyType & | t | ) | const [inline] |
Not equal to operator.
MyType& Saf::Collection::StaticArray< N, T >::operator= | ( | const MyType & | t | ) | [inline] |
Assignment operator.
Reimplemented in Saf::Math::Algebra::Vector< N, T >, Saf::Math::Algebra::Vector< N, Size >, and Saf::Math::Algebra::Matrix< N, N, T >.
bool Saf::Collection::StaticArray< N, T >::operator== | ( | const MyType & | t | ) | const [inline] |
Equal to operator.
const T& Saf::Collection::StaticArray< N, T >::operator[] | ( | Size | i | ) | const [inline] |
Subscript operator.
T& Saf::Collection::StaticArray< N, T >::operator[] | ( | Size | i | ) | [inline] |
Subscript operator.
MyType& Saf::Collection::StaticArray< N, T >::Set | ( | const T & | v1, |
const T & | v2 | ||
) | [inline] |
Set the values of elements in an array of size 2.
MyType& Saf::Collection::StaticArray< N, T >::Set | ( | const T & | v1, |
const T & | v2, | ||
const T & | v3 | ||
) | [inline] |
Set the values of elements in an array of size 3.
MyType& Saf::Collection::StaticArray< N, T >::Set | ( | const T & | v1, |
const T & | v2, | ||
const T & | v3, | ||
const T & | v4 | ||
) | [inline] |
Set the values of elements in an array of size 4.
T Saf::Collection::StaticArray< N, T >::m_data[N] [protected] |
Data container.