SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::gui::qt::vector_data_trait< T > Class Template Reference

#include <SimpleDataWidget.h>

arrays and vectors support More...

Inheritance diagram for sofa::gui::qt::vector_data_trait< T >:

Detailed Description

template<class T>
class sofa::gui::qt::vector_data_trait< T >

arrays and vectors support

This class is used to get properties of a data type in order to display it as a table or a list

Public Member Functions

template<>
const char * header (const data_type &, int i)
 
template<>
const char * header (const data_type &, int i)
 
template<>
const char * header (const data_type &, int i)
 
template<>
const char * header (const data_type &, int i)
 

Static Public Member Functions

static int size (const data_type &)
 Get the number of rows. More...
 
static const char * header (const data_type &, int=0)
 Get the name of a row, or nullptr if the index should be used instead. More...
 
static const value_typeget (const data_type &d, int i=0)
 Get a row. More...
 
static void set (const value_type &v, data_type &d, int i=0)
 Set a row. More...
 
static void resize (int, data_type &)
 Resize. More...
 

Function details

template<class T>
static const value_type* sofa::gui::qt::vector_data_trait< T >::get ( const data_type d,
int  i = 0 
)
inlinestatic

Get a row.

template<class T>
static const char* sofa::gui::qt::vector_data_trait< T >::header ( const data_type ,
int  = 0 
)
inlinestatic

Get the name of a row, or nullptr if the index should be used instead.

template<>
const char * sofa::gui::qt::vector_data_trait< sofa::defaulttype::Vec< 2, float > >::header ( const data_type ,
int  i 
)
inline
template<>
const char * sofa::gui::qt::vector_data_trait< sofa::defaulttype::Vec< 2, double > >::header ( const data_type ,
int  i 
)
inline
template<>
const char * sofa::gui::qt::vector_data_trait< sofa::defaulttype::Vec< 3, float > >::header ( const data_type ,
int  i 
)
inline
template<>
const char * sofa::gui::qt::vector_data_trait< sofa::defaulttype::Vec< 3, double > >::header ( const data_type ,
int  i 
)
inline
template<class T>
static void sofa::gui::qt::vector_data_trait< T >::resize ( int  ,
data_type  
)
inlinestatic

Resize.

template<class T>
static void sofa::gui::qt::vector_data_trait< T >::set ( const value_type v,
data_type d,
int  i = 0 
)
inlinestatic

Set a row.

template<class T>
static int sofa::gui::qt::vector_data_trait< T >::size ( const data_type )
inlinestatic

Get the number of rows.

Enum details

template<class T>
anonymous enum

Number of dimensions of this data type.

Enumerator
NDIM 
template<class T>
anonymous enum
Enumerator
SIZE