F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Fw::Array< T, S > Class Template Referencefinal

#include <Fw/DataStructures/Array.hpp>

Public Types

using Elements = T[S]
 The type of the elements array. More...
 

Public Member Functions

 Array ()=default
 Zero-argument constructor. More...
 
 Array (const std::initializer_list< T > &il)
 Initializer list constructor. More...
 
 Array (const Elements &elements)
 Primitive array constructor. More...
 
 Array (const T &element)
 Single-element constructor. More...
 
 Array (const Array< T, S > &a)
 Copy constructor. More...
 
 ~Array ()=default
 Destructor. More...
 
T & operator[] (FwSizeType i)
 
const T & operator[] (FwSizeType i) const
 
Array< T, S > & operator= (const std::initializer_list< T > &il)
 
Array< T, S > & operator= (const Elements &elements)
 
Array< T, S > & operator= (const T &element)
 operator= (single element) More...
 
Array< T, S > & operator= (const Array< T, S > &a)
 
ElementsgetElements ()
 
const ElementsgetElements () const
 
ExternalArray< T > asExternalArray ()
 Convert this array to an ExternalArray. More...
 

Detailed Description

template<typename T, FwSizeType S>
class Fw::Array< T, S >

Definition at line 19 of file Array.hpp.

Member Typedef Documentation

◆ Elements

template<typename T, FwSizeType S>
using Fw::Array< T, S >::Elements = T[S]

The type of the elements array.

Definition at line 33 of file Array.hpp.

Constructor & Destructor Documentation

◆ Array() [1/5]

template<typename T, FwSizeType S>
Fw::Array< T, S >::Array ( )
default

Zero-argument constructor.

◆ Array() [2/5]

template<typename T, FwSizeType S>
Fw::Array< T, S >::Array ( const std::initializer_list< T > &  il)
inline

Initializer list constructor.

Parameters
ilThe initializer list

Definition at line 44 of file Array.hpp.

◆ Array() [3/5]

template<typename T, FwSizeType S>
Fw::Array< T, S >::Array ( const Elements elements)
inline

Primitive array constructor.

Parameters
elementsThe array elements

Definition at line 50 of file Array.hpp.

◆ Array() [4/5]

template<typename T, FwSizeType S>
Fw::Array< T, S >::Array ( const T &  element)
inlineexplicit

Single-element constructor.

Parameters
elementThe element

Definition at line 56 of file Array.hpp.

◆ Array() [5/5]

template<typename T, FwSizeType S>
Fw::Array< T, S >::Array ( const Array< T, S > &  a)
inline

Copy constructor.

Parameters
aThe array to copy

Definition at line 62 of file Array.hpp.

◆ ~Array()

template<typename T, FwSizeType S>
Fw::Array< T, S >::~Array ( )
default

Destructor.

Member Function Documentation

◆ asExternalArray()

template<typename T, FwSizeType S>
ExternalArray<T> Fw::Array< T, S >::asExternalArray ( )
inline

Convert this array to an ExternalArray.

Definition at line 147 of file Array.hpp.

◆ getElements() [1/2]

template<typename T, FwSizeType S>
Elements& Fw::Array< T, S >::getElements ( )
inline

Get a mutable reference to the elements

Returns
A mutable reference to the elements

Definition at line 139 of file Array.hpp.

◆ getElements() [2/2]

template<typename T, FwSizeType S>
const Elements& Fw::Array< T, S >::getElements ( ) const
inline

Get a const reference to the elements

Returns
A const reference to the elements

Definition at line 143 of file Array.hpp.

◆ operator=() [1/4]

template<typename T, FwSizeType S>
Array<T, S>& Fw::Array< T, S >::operator= ( const std::initializer_list< T > &  il)
inline

operator= (initializer list)

Returns
*this
Parameters
ilThe initializer list

Definition at line 93 of file Array.hpp.

◆ operator=() [2/4]

template<typename T, FwSizeType S>
Array<T, S>& Fw::Array< T, S >::operator= ( const Elements elements)
inline

operator= (primitive array)

Returns
*this
Parameters
elementsThe array elements

Definition at line 109 of file Array.hpp.

◆ operator=() [3/4]

template<typename T, FwSizeType S>
Array<T, S>& Fw::Array< T, S >::operator= ( const T &  element)
inline

operator= (single element)

Parameters
elementThe element

Definition at line 118 of file Array.hpp.

◆ operator=() [4/4]

template<typename T, FwSizeType S>
Array<T, S>& Fw::Array< T, S >::operator= ( const Array< T, S > &  a)
inline

operator= (copy assignment)

Returns
*this

Definition at line 128 of file Array.hpp.

◆ operator[]() [1/2]

template<typename T, FwSizeType S>
T& Fw::Array< T, S >::operator[] ( FwSizeType  i)
inline

Subscript operator

Returns
The element at index i
Parameters
iThe subscript index

Definition at line 77 of file Array.hpp.

◆ operator[]() [2/2]

template<typename T, FwSizeType S>
const T& Fw::Array< T, S >::operator[] ( FwSizeType  i) const
inline

Const subscript operator

Returns
The element at index i
Parameters
iThe subscript index

Definition at line 85 of file Array.hpp.


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