Arduino Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | List of all members
ustd::array< T, N > Class Template Reference

basically just a wrap for an cpp-array More...

#include <array.hpp>

Public Types

typedef T value_type
 
typedef uint16_t size_type
 

Public Member Functions

 array ()
 just initialises all with "zeros" More...
 
 array (T const &init)
 initialises all with init More...
 
 array (array const &arg)
 copy constructor More...
 
arrayoperator= (array const &rhs)
 asignment operator More...
 
T & operator[] (size_type const &pos)
 returns element at a position More...
 
T const & operator[] (size_type const &pos) const
 returns element at a position (const version) More...
 
T * data ()
 just return the internal cpp-array More...
 
constexpr size_type size ()
 retuns the size (equal to N) More...
 
template<typename S >
void print (S &os) const
 print to any stream-concept More...
 
template<typename Archive >
void serialize (Archive &ar)
 serializes to or from archive More...
 
void clear ()
 set all elements to "zero" More...
 

Detailed Description

template<typename T, uint16_t N>
class ustd::array< T, N >

basically just a wrap for an cpp-array

Template Parameters
Tis the type in the container
Nis the size of the array

Member Typedef Documentation

template<typename T, uint16_t N>
typedef uint16_t ustd::array< T, N >::size_type
template<typename T, uint16_t N>
typedef T ustd::array< T, N >::value_type

Constructor & Destructor Documentation

template<typename T, uint16_t N>
ustd::array< T, N >::array ( )
inline

just initialises all with "zeros"

template<typename T, uint16_t N>
ustd::array< T, N >::array ( T const &  init)
inline

initialises all with init

Parameters
initall positions are set to this parameter
template<typename T, uint16_t N>
ustd::array< T, N >::array ( array< T, N > const &  arg)
inline

copy constructor

Member Function Documentation

template<typename T, uint16_t N>
void ustd::array< T, N >::clear ( )
inline

set all elements to "zero"

template<typename T, uint16_t N>
T* ustd::array< T, N >::data ( )
inline

just return the internal cpp-array

template<typename T, uint16_t N>
array& ustd::array< T, N >::operator= ( array< T, N > const &  rhs)
inline

asignment operator

template<typename T, uint16_t N>
T& ustd::array< T, N >::operator[] ( size_type const &  pos)
inline

returns element at a position

Parameters
posis the position of interest

bounds are checked if debug is active, else no bound check

template<typename T, uint16_t N>
T const& ustd::array< T, N >::operator[] ( size_type const &  pos) const
inline

returns element at a position (const version)

Parameters
posis the position of interest

bounds are checked if debug is active, else no bound check

template<typename T, uint16_t N>
template<typename S >
void ustd::array< T, N >::print ( S &  os) const
inline

print to any stream-concept

Template Parameters
stream-concept
Parameters
osis an instance of a stream-concept
template<typename T, uint16_t N>
template<typename Archive >
void ustd::array< T, N >::serialize ( Archive &  ar)
inline

serializes to or from archive

Template Parameters
archive-concept
Parameters
aris the archive
template<typename T, uint16_t N>
constexpr size_type ustd::array< T, N >::size ( )
inline

retuns the size (equal to N)


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