SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::core::BaseVecId Class Reference

#include <VecId.h>

Inheritance diagram for sofa::core::BaseVecId:

Detailed Description

This is a base class for TVecId that contains all the data stored.

Note
TVecId itself stores no data, in order to be able to convert between templates inplace with reinterpret_cast for performance reasons (typically when working with TMultiVecId instances, which would otherwise copy maps of TVecId). This is (a little) less efficient for non V_ALL versions, but is without comparison with the loss of performance with the typical operation of passing a stored "TMultiVecId<!V_ALL,V_WRITE>" to a method taking a "const TMultiVecId<V_ALL,V_READ>&".

Public Attributes

VecType type
 
unsigned int index
 

Public Member Functions

VecType getType () const
 
unsigned int getIndex () const
 

Protected Member Functions

 BaseVecId (VecType t, unsigned int i)
 

Attribute details

◆ index

unsigned int sofa::core::BaseVecId::index

◆ type

VecType sofa::core::BaseVecId::type

Constructor details

◆ BaseVecId()

sofa::core::BaseVecId::BaseVecId ( VecType  t,
unsigned int  i 
)
inlineprotected

Function details

◆ getIndex()

unsigned int sofa::core::BaseVecId::getIndex ( ) const
inline

◆ getType()

VecType sofa::core::BaseVecId::getType ( ) const
inline