SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::type::fixed_array< T, N > Class Template Reference

#include <fixed_array.h>

Inheritance diagram for sofa::type::fixed_array< T, N >:

Public Attributes

elems [N] {}
 

Public Member Functions

constexpr fixed_array ()
 
template<size_type NN = N, typename std::enable_if< NN==1, int >::type = 0>
constexpr fixed_array (value_type r1) noexcept
 Specific constructor for 1-element vectors. More...
 
template<typename... ArgsT, typename = std::enable_if_t< (std::is_convertible_v<ArgsT, value_type> && ...) >, typename = std::enable_if_t< (sizeof...(ArgsT) == N && sizeof...(ArgsT) > 1) >>
constexpr fixed_array (ArgsT &&... r) noexcept
 
constexpr iterator begin () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr iterator end () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr reference operator[] (size_type i)
 
constexpr const_reference operator[] (size_type i) const
 
template<std::size_t I>
constexpr T & get () &noexcept
 
template<std::size_t I>
constexpr const T & get () const &noexcept
 
template<std::size_t I>
constexpr T && get () &&noexcept
 
template<std::size_t I>
constexpr const T && get () const &&noexcept
 
constexpr reference at (size_type i)
 
constexpr const_reference at (size_type i) const
 
constexpr reference front ()
 
constexpr const_reference front () const
 
constexpr reference back ()
 
constexpr const_reference back () const
 
void swap (fixed_array< T, N > &y)
 
constexpr const T * data () const noexcept
 
constexpr const Arrayarray () const noexcept
 direct access to array More...
 
constexpr Arrayarray () noexcept
 direct access to array More...
 
template<typename T2 >
constexpr fixed_array< T, N > & operator= (const fixed_array< T2, N > &rhs) noexcept
 
constexpr void assign (const T &value) noexcept
 

Static Public Member Functions

static constexpr size_type size () noexcept
 
static bool empty () noexcept
 
static constexpr size_type max_size () noexcept
 

Friends

std::ostream & operator<< (std::ostream &out, const fixed_array< T, N > &a)
 
std::istream & operator>> (std::istream &in, fixed_array< T, N > &a)
 

Attribute details

◆ elems

template<class T , sofa::Size N>
T sofa::type::fixed_array< T, N >::elems[N] {}

Constructor details

◆ fixed_array() [1/3]

template<class T , sofa::Size N>
constexpr sofa::type::fixed_array< T, N >::fixed_array ( )
inlineconstexpr

◆ fixed_array() [2/3]

template<class T , sofa::Size N>
template<size_type NN = N, typename std::enable_if< NN==1, int >::type = 0>
constexpr sofa::type::fixed_array< T, N >::fixed_array ( value_type  r1)
inlineexplicitconstexprnoexcept

Specific constructor for 1-element vectors.

◆ fixed_array() [3/3]

template<class T , sofa::Size N>
template<typename... ArgsT, typename = std::enable_if_t< (std::is_convertible_v<ArgsT, value_type> && ...) >, typename = std::enable_if_t< (sizeof...(ArgsT) == N && sizeof...(ArgsT) > 1) >>
constexpr sofa::type::fixed_array< T, N >::fixed_array ( ArgsT &&...  r)
inlineconstexprnoexcept

Function details

◆ array() [1/2]

template<class T , sofa::Size N>
constexpr const Array& sofa::type::fixed_array< T, N >::array ( ) const
inlineconstexprnoexcept

direct access to array

◆ array() [2/2]

template<class T , sofa::Size N>
constexpr Array& sofa::type::fixed_array< T, N >::array ( )
inlineconstexprnoexcept

direct access to array

◆ assign()

template<class T , sofa::Size N>
constexpr void sofa::type::fixed_array< T, N >::assign ( const T &  value)
inlineconstexprnoexcept

◆ at() [1/2]

template<class T , sofa::Size N>
constexpr reference sofa::type::fixed_array< T, N >::at ( size_type  i)
inlineconstexpr

◆ at() [2/2]

template<class T , sofa::Size N>
constexpr const_reference sofa::type::fixed_array< T, N >::at ( size_type  i) const
inlineconstexpr

◆ back() [1/2]

template<class T , sofa::Size N>
constexpr reference sofa::type::fixed_array< T, N >::back ( )
inlineconstexpr

◆ back() [2/2]

template<class T , sofa::Size N>
constexpr const_reference sofa::type::fixed_array< T, N >::back ( ) const
inlineconstexpr

◆ begin() [1/2]

template<class T , sofa::Size N>
constexpr const_iterator sofa::type::fixed_array< T, N >::begin ( ) const
inlineconstexprnoexcept

◆ begin() [2/2]

template<class T , sofa::Size N>
constexpr iterator sofa::type::fixed_array< T, N >::begin ( )
inlineconstexprnoexcept

◆ cbegin()

template<class T , sofa::Size N>
constexpr const_iterator sofa::type::fixed_array< T, N >::cbegin ( ) const
inlineconstexprnoexcept

◆ cend()

template<class T , sofa::Size N>
constexpr const_iterator sofa::type::fixed_array< T, N >::cend ( ) const
inlineconstexprnoexcept

◆ data()

template<class T , sofa::Size N>
constexpr const T* sofa::type::fixed_array< T, N >::data ( ) const
inlineconstexprnoexcept

◆ empty()

template<class T , sofa::Size N>
static bool sofa::type::fixed_array< T, N >::empty ( )
inlinestaticnoexcept

◆ end() [1/2]

template<class T , sofa::Size N>
constexpr const_iterator sofa::type::fixed_array< T, N >::end ( ) const
inlineconstexprnoexcept

◆ end() [2/2]

template<class T , sofa::Size N>
constexpr iterator sofa::type::fixed_array< T, N >::end ( )
inlineconstexprnoexcept

◆ front() [1/2]

template<class T , sofa::Size N>
constexpr reference sofa::type::fixed_array< T, N >::front ( )
inlineconstexpr

◆ front() [2/2]

template<class T , sofa::Size N>
constexpr const_reference sofa::type::fixed_array< T, N >::front ( ) const
inlineconstexpr

◆ get() [1/4]

template<class T , sofa::Size N>
template<std::size_t I>
constexpr T&& sofa::type::fixed_array< T, N >::get ( ) &&
inlineconstexprnoexcept

◆ get() [2/4]

template<class T , sofa::Size N>
template<std::size_t I>
constexpr T& sofa::type::fixed_array< T, N >::get ( ) &
inlineconstexprnoexcept

◆ get() [3/4]

template<class T , sofa::Size N>
template<std::size_t I>
constexpr const T&& sofa::type::fixed_array< T, N >::get ( ) const &&
inlineconstexprnoexcept

◆ get() [4/4]

template<class T , sofa::Size N>
template<std::size_t I>
constexpr const T& sofa::type::fixed_array< T, N >::get ( ) const &
inlineconstexprnoexcept

◆ max_size()

template<class T , sofa::Size N>
static constexpr size_type sofa::type::fixed_array< T, N >::max_size ( )
inlinestaticconstexprnoexcept

◆ operator=()

template<class T , sofa::Size N>
template<typename T2 >
constexpr fixed_array<T,N>& sofa::type::fixed_array< T, N >::operator= ( const fixed_array< T2, N > &  rhs)
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<class T , sofa::Size N>
constexpr reference sofa::type::fixed_array< T, N >::operator[] ( size_type  i)
inlineconstexpr

◆ operator[]() [2/2]

template<class T , sofa::Size N>
constexpr const_reference sofa::type::fixed_array< T, N >::operator[] ( size_type  i) const
inlineconstexpr

◆ size()

template<class T , sofa::Size N>
static constexpr size_type sofa::type::fixed_array< T, N >::size ( void  )
inlinestaticconstexprnoexcept

◆ swap()

template<class T , sofa::Size N>
void sofa::type::fixed_array< T, N >::swap ( fixed_array< T, N > &  y)
inline

Enum details

◆ anonymous enum

template<class T , sofa::Size N>
anonymous enum
Enumerator
static_size 

Related details

◆ operator<<

template<class T , sofa::Size N>
std::ostream& operator<< ( std::ostream &  out,
const fixed_array< T, N > &  a 
)
friend

◆ operator>>

template<class T , sofa::Size N>
std::istream& operator>> ( std::istream &  in,
fixed_array< T, N > &  a 
)
friend