SOFA API  014b24ea
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.

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

unsigned int sofa::core::BaseVecId::index
VecType sofa::core::BaseVecId::type

Constructor details

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

Function details

unsigned int sofa::core::BaseVecId::getIndex ( ) const
VecType sofa::core::BaseVecId::getType ( ) const