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

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

#include <Array3DFixed.h>

Classes

class  Dim1Proxy
 Array first dimension proxy. More...
 

Public Member Functions

 Array3DFixed ()=default
 Default constructor.
 
 Array3DFixed (const T &val)
 Constructs array of specified value.
 
 Array3DFixed (const Array3DFixed< T, L, M, N > &rhs)=default
 Copy constructor.
 
virtual ~Array3DFixed ()=default
 Destructor.
 
Array3DFixed< T, L, M, N > & operator= (const Array3DFixed< T, L, M, N > &rhs)=default
 Copy assignment operator.
 
Dim1Proxy operator[] (int i)
 Index first dimension of array.
 
const Dim1Proxy operator[] (int i) const
 Index first dimension of array.
 
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 size1 ()
 Size of first dimension of array.
 
static int size2 ()
 Size of second dimension of array.
 
static int size3 ()
 Size of third dimension of array.
 
static int stride1 ()
 Stride in bytes through the first dimension of the array.
 
static int stride2 ()
 Stride in bytes through the second dimension of the array.
 
static int stride3 ()
 Stride in bytes through the third dimension of the array.
 

Detailed Description

template<typename T, size_t L, size_t M, size_t N>
class blo::Array3DFixed< T, L, M, N >

Small 3D array, fixed size.

Template Parameters
TData type.
LSize of first dimension.
MSize of second dimension.
NSize of third dimension.

Constructor & Destructor Documentation

◆ Array3DFixed() [1/3]

template<typename T , size_t L, size_t M, size_t N>
blo::Array3DFixed< T, L, M, N >::Array3DFixed ( )
default

Default constructor.

◆ Array3DFixed() [2/3]

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

Constructs array of specified value.

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

◆ Array3DFixed() [3/3]

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

Copy constructor.

◆ ~Array3DFixed()

template<typename T , size_t L, size_t M, size_t N>
virtual blo::Array3DFixed< T, L, M, N >::~Array3DFixed ( )
virtualdefault

Destructor.

Member Function Documentation

◆ operator=()

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

Copy assignment operator.

◆ operator[]() [1/2]

template<typename T , size_t L, size_t M, size_t N>
Dim1Proxy blo::Array3DFixed< T, L, M, N >::operator[] ( int  i)

Index first dimension of array.

Note
Index second dimension of array using array[i][j].
Parameters
iFirst dimension of the array.
Returns
Proxy of the first dimension.

◆ operator[]() [2/2]

template<typename T , size_t L, size_t M, size_t N>
const Dim1Proxy blo::Array3DFixed< T, L, M, N >::operator[] ( int  i) const

Index first dimension of array.

Note
Index second dimension of array using array[i][j].
Parameters
iFirst dimension of the array.
Returns
Proxy of the first dimension.

◆ ptrData() [1/2]

template<typename T , size_t L, size_t M, size_t N>
T * blo::Array3DFixed< T, L, M, 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 L, size_t M, size_t N>
const T * blo::Array3DFixed< T, L, M, 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 L, size_t M, size_t N>
void blo::Array3DFixed< T, L, M, N >::set ( const T &  val)

Sets array elements to a value.

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

◆ size1()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::size1 ( )
static

Size of first dimension of array.

Returns
Size of first dimension of array.

◆ size2()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::size2 ( )
static

Size of second dimension of array.

Returns
Size of second dimension of array.

◆ size3()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::size3 ( )
static

Size of third dimension of array.

Returns
Size of third dimension of array.

◆ stride1()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::stride1 ( )
static

Stride in bytes through the first dimension of the array.

Returns
Stride in bytes through the first dimension of the array.

◆ stride2()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::stride2 ( )
static

Stride in bytes through the second dimension of the array.

Returns
Stride in bytes through the second dimension of the array.

◆ stride3()

template<typename T , size_t L, size_t M, size_t N>
static int blo::Array3DFixed< T, L, M, N >::stride3 ( )
static

Stride in bytes through the third dimension of the array.

Returns
Stride in bytes through the third dimension of the array.

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