SOFA API  1c8b807d
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

const charheader (const data_type &, Size i)
 
const charheader (const data_type &, Size i)
 
const charheader (const data_type &, Size i)
 
const charheader (const data_type &, Size i)
 

Static Public Member Functions

static Size size (const data_type &)
 Get the number of rows. More...
 
static const charheader (const data_type &, Size=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, Size i=0)
 Get a row. More...
 
static void set (const value_type &v, data_type &d, Size i=0)
 Set a row. More...
 
static void resize (Size, data_type &)
 Resize. More...
 

Function details

◆ get()

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

Get a row.

◆ header() [1/5]

const char * sofa::gui::qt::vector_data_trait< sofa::type::Vec< 2, float > >::header ( const data_type ,
Size  i 
)
inline

◆ header() [2/5]

const char * sofa::gui::qt::vector_data_trait< sofa::type::Vec< 2, double > >::header ( const data_type ,
Size  i 
)
inline

◆ header() [3/5]

const char * sofa::gui::qt::vector_data_trait< sofa::type::Vec< 3, float > >::header ( const data_type ,
Size  i 
)
inline

◆ header() [4/5]

const char * sofa::gui::qt::vector_data_trait< sofa::type::Vec< 3, double > >::header ( const data_type ,
Size  i 
)
inline

◆ header() [5/5]

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

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

◆ resize()

template<class T >
static void sofa::gui::qt::vector_data_trait< T >::resize ( Size  ,
data_type  
)
inlinestatic

Resize.

◆ set()

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

Set a row.

◆ size()

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

Get the number of rows.

Enum details

◆ anonymous enum

template<class T >
anonymous enum

Number of dimensions of this data type.

Enumerator
NDIM 

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
SIZE