The blo Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
blo::Array1DFixed< T, N > Class Template Reference

Small 1D array, fixed size. More...

#include <Array1DFixed.h>

Inheritance diagram for blo::Array1DFixed< T, N >:
blo::HomgArray1DFixed< T, N+1 > blo::HomgArray1DFixed< T, 3 > blo::HomgArray1DFixed< T, 4 > blo::HomgArray1DFixed< T, 2 > blo::HomgArray1DFixed< U, 4 > blo::HomgArray1DFixed< T, 6 > blo::HomgArray1DFixed< T, N > blo::Point< T, N >

Public Member Functions

 Array1DFixed ()=default
 Default constructor.
 
 Array1DFixed (const T &val)
 Constructs array of specified value.
 
 Array1DFixed (const std::initializer_list< T > &list)
 Constructs array that is a copy of specified initializer list.
 
 Array1DFixed (const Array1DFixed< T, N > &rhs)=default
 Copy constructor.
 
virtual ~Array1DFixed ()=default
 Destructor.
 
Array1DFixed< T, N > & operator= (const Array1DFixed< T, N > &rhs)=default
 Copy assignment operator.
 
T & operator[] (int n)
 Index array element.
 
const T & operator[] (int n) const
 Index array element.
 
T * ptrData ()
 Retrieves the pointer to the beginning of the array.
 
const T * ptrData () const
 Retrieves the pointer to the beginning of the array.
 
void set (const T &val)
 Sets array elements to a value.
 

Static Public Member Functions

static int size ()
 Number of elements in the array.
 
static int len ()
 Length of the array.
 
static int stride2 ()
 Stride in bytes between the elements in the array.
 

Detailed Description

template<typename T, size_t N>
class blo::Array1DFixed< T, N >

Small 1D array, fixed size.

Template Parameters
TData type.
NArray size.

Constructor & Destructor Documentation

◆ Array1DFixed() [1/4]

template<typename T , size_t N>
blo::Array1DFixed< T, N >::Array1DFixed ( )
default

Default constructor.

◆ Array1DFixed() [2/4]

template<typename T , size_t N>
blo::Array1DFixed< T, N >::Array1DFixed ( const T &  val)
explicit

Constructs array of specified value.

Parameters
valConstant value to assign to each element in the array.

◆ Array1DFixed() [3/4]

template<typename T , size_t N>
blo::Array1DFixed< T, N >::Array1DFixed ( const std::initializer_list< T > &  list)

Constructs array that is a copy of specified initializer list.

Parameters
listInitializer list.

◆ Array1DFixed() [4/4]

template<typename T , size_t N>
blo::Array1DFixed< T, N >::Array1DFixed ( const Array1DFixed< T, N > &  rhs)
default

Copy constructor.

◆ ~Array1DFixed()

template<typename T , size_t N>
virtual blo::Array1DFixed< T, N >::~Array1DFixed ( )
virtualdefault

Destructor.

Member Function Documentation

◆ len()

template<typename T , size_t N>
static int blo::Array1DFixed< T, N >::len ( )
static

Length of the array.

Returns
Length of the array.

◆ operator=()

template<typename T , size_t N>
Array1DFixed< T, N > & blo::Array1DFixed< T, N >::operator= ( const Array1DFixed< T, N > &  rhs)
default

Copy assignment operator.

◆ operator[]() [1/2]

template<typename T , size_t N>
T & blo::Array1DFixed< T, N >::operator[] ( int  n)

Index array element.

Parameters
nIndex of the array.
Returns
The element value.

◆ operator[]() [2/2]

template<typename T , size_t N>
const T & blo::Array1DFixed< T, N >::operator[] ( int  n) const

Index array element.

Parameters
nIndex of the array.
Returns
The element value.

◆ ptrData() [1/2]

template<typename T , size_t N>
T * blo::Array1DFixed< T, N >::ptrData ( )

Retrieves the pointer to the beginning of the array.

Returns
Pointer to the beginning of the array.

◆ ptrData() [2/2]

template<typename T , size_t N>
const T * blo::Array1DFixed< T, N >::ptrData ( ) const

Retrieves the pointer to the beginning of the array.

Returns
Pointer to the beginning of the array.

◆ set()

template<typename T , size_t N>
void blo::Array1DFixed< T, N >::set ( const T &  val)

Sets array elements to a value.

Parameters
valConstant value to assign to each element in the array.

◆ size()

template<typename T , size_t N>
static int blo::Array1DFixed< T, N >::size ( )
static

Number of elements in the array.

Returns
Number of elements in the array.

◆ stride2()

template<typename T , size_t N>
static int blo::Array1DFixed< T, N >::stride2 ( )
static

Stride in bytes between the elements in the array.

Returns
Stride in bytes between the elements in the array.

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