SOFA API  4c98347f
Open source framework for multi-physics simuation
sofa::helper::fixed_array< T, N > Class Template Reference

#include <fixed_array.h>

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

Public Attributes

elems [N]
 

Public Member Functions

 fixed_array ()
 
template<int NN = N, typename std::enable_if< NN==1, int >::type = 0>
 fixed_array (value_type r1)
 Specific constructor for 1-element vectors. More...
 
template<int NN = N, typename std::enable_if< NN==2, int >::type = 0>
 fixed_array (value_type r1, value_type r2)
 Specific constructor for 2-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==3, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3)
 Specific constructor for 3-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==4, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4)
 Specific constructor for 4-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==5, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5)
 Specific constructor for 5-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==6, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6)
 Specific constructor for 6-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==7, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7)
 Specific constructor for 7-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==8, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8)
 Specific constructor for 8-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==9, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8, value_type r9)
 Specific constructor for 9-elements vectors. More...
 
template<int NN = N, typename std::enable_if< NN==10, int >::type = 0>
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8, value_type r9, value_type r10)
 Specific constructor for 10-elements vectors. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference at (size_type i)
 
const_reference at (size_type i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void swap (fixed_array< T, N > &y)
 
const T * data () const
 
const Arrayarray () const
 direct access to array More...
 
Arrayarray ()
 direct access to array More...
 
template<typename T2 >
fixed_array< T, N > & operator= (const fixed_array< T2, N > &rhs)
 
void assign (const T &value)
 
bool operator< (const fixed_array &v) const
 

Static Public Member Functions

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

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

template<class T, std::size_t N>
T sofa::helper::fixed_array< T, N >::elems[N]

Constructor details

template<class T, std::size_t N>
sofa::helper::fixed_array< T, N >::fixed_array ( )
inline
template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==1, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1)
inlineexplicit

Specific constructor for 1-element vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==2, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2 
)
inline

Specific constructor for 2-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==3, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3 
)
inline

Specific constructor for 3-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==4, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4 
)
inline

Specific constructor for 4-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==5, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5 
)
inline

Specific constructor for 5-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==6, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5,
value_type  r6 
)
inline

Specific constructor for 6-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==7, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5,
value_type  r6,
value_type  r7 
)
inline

Specific constructor for 7-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==8, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5,
value_type  r6,
value_type  r7,
value_type  r8 
)
inline

Specific constructor for 8-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==9, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5,
value_type  r6,
value_type  r7,
value_type  r8,
value_type  r9 
)
inline

Specific constructor for 9-elements vectors.

template<class T, std::size_t N>
template<int NN = N, typename std::enable_if< NN==10, int >::type = 0>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3,
value_type  r4,
value_type  r5,
value_type  r6,
value_type  r7,
value_type  r8,
value_type  r9,
value_type  r10 
)
inline

Specific constructor for 10-elements vectors.

Function details

template<class T, std::size_t N>
const Array& sofa::helper::fixed_array< T, N >::array ( ) const
inline

direct access to array

template<class T, std::size_t N>
Array& sofa::helper::fixed_array< T, N >::array ( )
inline

direct access to array

template<class T, std::size_t N>
void sofa::helper::fixed_array< T, N >::assign ( const T &  value)
inline
template<class T, std::size_t N>
reference sofa::helper::fixed_array< T, N >::at ( size_type  i)
inline
template<class T, std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::at ( size_type  i) const
inline
template<class T, std::size_t N>
reference sofa::helper::fixed_array< T, N >::back ( )
inline
template<class T, std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::back ( ) const
inline
template<class T, std::size_t N>
iterator sofa::helper::fixed_array< T, N >::begin ( )
inline
template<class T, std::size_t N>
const_iterator sofa::helper::fixed_array< T, N >::begin ( ) const
inline
template<class T, std::size_t N>
const T* sofa::helper::fixed_array< T, N >::data ( ) const
inline
template<class T, std::size_t N>
static bool sofa::helper::fixed_array< T, N >::empty ( )
inlinestatic
template<class T, std::size_t N>
iterator sofa::helper::fixed_array< T, N >::end ( )
inline
template<class T, std::size_t N>
const_iterator sofa::helper::fixed_array< T, N >::end ( ) const
inline
template<class T, std::size_t N>
reference sofa::helper::fixed_array< T, N >::front ( )
inline
template<class T, std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::front ( ) const
inline
template<class T, std::size_t N>
static size_type sofa::helper::fixed_array< T, N >::max_size ( )
inlinestatic
template<class T, std::size_t N>
bool sofa::helper::fixed_array< T, N >::operator< ( const fixed_array< T, N > &  v) const
inline
template<class T, std::size_t N>
template<typename T2 >
fixed_array<T,N>& sofa::helper::fixed_array< T, N >::operator= ( const fixed_array< T2, N > &  rhs)
inline
template<class T, std::size_t N>
reference sofa::helper::fixed_array< T, N >::operator[] ( size_type  i)
inline
template<class T, std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::operator[] ( size_type  i) const
inline
template<class T, std::size_t N>
static size_type sofa::helper::fixed_array< T, N >::size ( void  )
inlinestatic
template<class T, std::size_t N>
void sofa::helper::fixed_array< T, N >::swap ( fixed_array< T, N > &  y)
inline

Enum details

template<class T, std::size_t N>
anonymous enum
Enumerator
static_size 

Related details

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