sofa::helper::fixed_array< T, N > Class Template Reference

#include <fixed_array.h>

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

Inheritance graph
[legend]
Collaboration diagram for sofa::helper::fixed_array< T, N >:

Collaboration graph
[legend]

Public Types

enum  { static_size = N }
typedef T value_type
typedef T * iterator
typedef const T * const_iterator
typedef T & reference
typedef const T & const_reference
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type

Public Member Functions

 fixed_array ()
 fixed_array (value_type r1)
 Specific constructor for 1-element vectors.
 fixed_array (value_type r1, value_type r2)
 Specific constructor for 2-elements vectors.
 fixed_array (value_type r1, value_type r2, value_type r3)
 Specific constructor for 3-elements vectors.
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4)
 Specific constructor for 4-elements vectors.
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5)
 Specific constructor for 5-elements vectors.
 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.
 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.
 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.
 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.
 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.
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
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 ()

Data Fields

T elems [N]

Static Private Member Functions

static void rangecheck (size_type i)

Friends

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

Detailed Description

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

Definition at line 73 of file fixed_array.h.


Member Typedef Documentation

template<class T , std::size_t N>
typedef const T* sofa::helper::fixed_array< T, N >::const_iterator

Definition at line 82 of file fixed_array.h.

template<class T , std::size_t N>
typedef const T& sofa::helper::fixed_array< T, N >::const_reference

Definition at line 84 of file fixed_array.h.

template<class T , std::size_t N>
typedef std::ptrdiff_t sofa::helper::fixed_array< T, N >::difference_type

Definition at line 86 of file fixed_array.h.

template<class T , std::size_t N>
typedef T* sofa::helper::fixed_array< T, N >::iterator

Definition at line 81 of file fixed_array.h.

template<class T , std::size_t N>
typedef T& sofa::helper::fixed_array< T, N >::reference

Definition at line 83 of file fixed_array.h.

template<class T , std::size_t N>
typedef std::size_t sofa::helper::fixed_array< T, N >::size_type

Definition at line 85 of file fixed_array.h.

template<class T , std::size_t N>
typedef T sofa::helper::fixed_array< T, N >::value_type

Definition at line 80 of file fixed_array.h.


Member Enumeration Documentation

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

Enumerator:
static_size 

Definition at line 280 of file fixed_array.h.


Constructor & Destructor Documentation

template<class T , std::size_t N>
sofa::helper::fixed_array< T, N >::fixed_array (  )  [inline]

Definition at line 88 of file fixed_array.h.

template<class T , std::size_t N>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1  )  [inline, explicit]

Specific constructor for 1-element vectors.

Definition at line 94 of file fixed_array.h.

template<class T , std::size_t N>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2 
) [inline]

Specific constructor for 2-elements vectors.

Definition at line 101 of file fixed_array.h.

template<class T , std::size_t N>
sofa::helper::fixed_array< T, N >::fixed_array ( value_type  r1,
value_type  r2,
value_type  r3 
) [inline]

Specific constructor for 3-elements vectors.

Definition at line 109 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 118 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 128 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 139 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 151 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 164 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 178 of file fixed_array.h.

template<class T , std::size_t N>
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.

Definition at line 193 of file fixed_array.h.


Member Function Documentation

template<class T , std::size_t N>
void sofa::helper::fixed_array< T, N >::assign ( const T &  value  )  [inline]

Definition at line 305 of file fixed_array.h.

template<class T , std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::at ( size_type  i  )  const [inline]

Definition at line 243 of file fixed_array.h.

template<class T , std::size_t N>
reference sofa::helper::fixed_array< T, N >::at ( size_type  i  )  [inline]

Definition at line 238 of file fixed_array.h.

template<class T , std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::back (  )  const [inline]

Definition at line 262 of file fixed_array.h.

template<class T , std::size_t N>
reference sofa::helper::fixed_array< T, N >::back (  )  [inline]

Definition at line 258 of file fixed_array.h.

template<class T , std::size_t N>
const_iterator sofa::helper::fixed_array< T, N >::begin (  )  const [inline]

Definition at line 214 of file fixed_array.h.

template<class T , std::size_t N>
iterator sofa::helper::fixed_array< T, N >::begin (  )  [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 (  )  [inline, static]

Definition at line 272 of file fixed_array.h.

template<class T , std::size_t N>
const_iterator sofa::helper::fixed_array< T, N >::end (  )  const [inline]

Definition at line 222 of file fixed_array.h.

template<class T , std::size_t N>
iterator sofa::helper::fixed_array< T, N >::end (  )  [inline]

template<class T , std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::front (  )  const [inline]

Definition at line 254 of file fixed_array.h.

template<class T , std::size_t N>
reference sofa::helper::fixed_array< T, N >::front (  )  [inline]

Definition at line 250 of file fixed_array.h.

template<class T , std::size_t N>
static size_type sofa::helper::fixed_array< T, N >::max_size (  )  [inline, static]

Definition at line 276 of file fixed_array.h.

template<class T , std::size_t N>
bool sofa::helper::fixed_array< T, N >::operator< ( const fixed_array< T, N > &  v  )  const [inline]

Definition at line 326 of file fixed_array.h.

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]

Definition at line 296 of file fixed_array.h.

template<class T , std::size_t N>
const_reference sofa::helper::fixed_array< T, N >::operator[] ( size_type  i  )  const [inline]

Definition at line 232 of file fixed_array.h.

template<class T , std::size_t N>
reference sofa::helper::fixed_array< T, N >::operator[] ( size_type  i  )  [inline]

Definition at line 228 of file fixed_array.h.

template<class T , std::size_t N>
static void sofa::helper::fixed_array< T, N >::rangecheck ( size_type  i  )  [inline, static, private]

template<class T , std::size_t N>
static size_type sofa::helper::fixed_array< T, N >::size ( void   )  [inline, static]

template<class T , std::size_t N>
void sofa::helper::fixed_array< T, N >::swap ( fixed_array< T, N > &  y  )  [inline]

Definition at line 283 of file fixed_array.h.


Friends And Related Function Documentation

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

Definition at line 312 of file fixed_array.h.

template<class T , std::size_t N>
std::istream& operator>> ( std::istream &  in,
fixed_array< T, N > &  a 
) [friend]

Definition at line 319 of file fixed_array.h.


Field Documentation

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

Definition at line 76 of file fixed_array.h.

Referenced by sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::assign(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::at(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::back(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::begin(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::clear(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::col(), sofa::helper::Quater< DataTypes::Real >::createQuaterFromEuler(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::data(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::end(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::fill(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::fixed_array(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::front(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::getsub(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::identity(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::isSymetric(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::line(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::lptr(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::Mat(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator!=(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator()(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator*=(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator+=(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator-=(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator/=(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::operator<(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::operator=(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator==(), sofa::helper::fixed_array< sofa::defaulttype::VecNoInit< C, real >, L >::operator[](), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::operator[](), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::ptr(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::setsub(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::transpose(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::transposed(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::w(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::x(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::y(), and sofa::defaulttype::Mat< 6, 6, Coord::value_type >::z().


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

Generated on Sun Nov 23 04:24:16 2008 for Sofa by  doxygen 1.5.7.1