SOFA API  1eb52420
Open source framework for multi-physics simuation
sofa::core::TVecId< vtype, vaccess > Class Template Reference

#include <VecId.h>

Inheritance diagram for sofa::core::TVecId< vtype, vaccess >:

Detailed Description

template<VecType vtype, VecAccess vaccess>
class sofa::core::TVecId< vtype, vaccess >

Identify a vector of a given type stored in State This class is templated in order to create different variations (generic versus specific type, read-only vs write access)

Public Member Functions

constexpr TVecId ()
 
constexpr TVecId (unsigned int i)
 
constexpr TVecId (const TVecId< vtype, vaccess > &v)
 Copy constructor. More...
 
template<VecAccess vaccess2>
constexpr TVecId (const TVecId< vtype, vaccess2 > &v)
 
template<VecAccess vaccess2>
constexpr TVecId (const TVecId< V_ALL, vaccess2 > &v)
 
constexpr TVecId< vtype, vaccess > & operator= (const TVecId< vtype, vaccess > &other)
 
template<VecAccess vaccess2>
constexpr TVecId< vtype, vaccess > & operator= (const TVecId< vtype, vaccess2 > &other)
 
template<VecAccess vaccess2>
constexpr TVecId< vtype, vaccess > & operator= (const TVecId< V_ALL, vaccess2 > &other)
 
template<VecType vtype2, VecAccess vaccess2>
constexpr bool operator== (const TVecId< vtype2, vaccess2 > &v) const
 
template<VecType vtype2, VecAccess vaccess2>
constexpr bool operator!= (const TVecId< vtype2, vaccess2 > &v) const
 
constexpr bool isNull () const
 
std::string getName () const
 
std::string getGroup () const
 
- Public Member Functions inherited from sofa::core::BaseVecId
constexpr VecType getType () const
 
constexpr unsigned int getIndex () const
 

Static Public Member Functions

template<State v_state>
static constexpr TVecId state ()
 
static constexpr TVecId null ()
 

Friends

std::ostream & operator<< (std::ostream &out, const TVecId &v)
 

Additional Inherited Members

- Public Attributes inherited from sofa::core::BaseVecId
VecType type
 
unsigned int index
 
- Protected Member Functions inherited from sofa::core::BaseVecId
constexpr BaseVecId (VecType t, unsigned int i)
 

Constructor details

◆ TVecId() [1/5]

template<VecType vtype, VecAccess vaccess>
constexpr sofa::core::TVecId< vtype, vaccess >::TVecId ( )
inlineconstexpr

◆ TVecId() [2/5]

template<VecType vtype, VecAccess vaccess>
constexpr sofa::core::TVecId< vtype, vaccess >::TVecId ( unsigned int  i)
inlineexplicitconstexpr

◆ TVecId() [3/5]

template<VecType vtype, VecAccess vaccess>
constexpr sofa::core::TVecId< vtype, vaccess >::TVecId ( const TVecId< vtype, vaccess > &  v)
inlineconstexpr

Copy constructor.

◆ TVecId() [4/5]

template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
constexpr sofa::core::TVecId< vtype, vaccess >::TVecId ( const TVecId< vtype, vaccess2 > &  v)
inlineconstexpr

Copy from another VecId, possibly with another type of access, with the constraint that the access must be compatible (i.e. cannot create a write-access VecId from a read-only VecId.

◆ TVecId() [5/5]

template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
constexpr sofa::core::TVecId< vtype, vaccess >::TVecId ( const TVecId< V_ALL, vaccess2 > &  v)
inlineexplicitconstexpr

Function details

◆ getGroup()

template<VecType vtype, VecAccess vaccess>
std::string sofa::core::TVecId< vtype, vaccess >::getGroup ( ) const
inline

◆ getName()

template<VecType vtype, VecAccess vaccess>
std::string sofa::core::TVecId< vtype, vaccess >::getName ( ) const
inline

◆ isNull()

template<VecType vtype, VecAccess vaccess>
constexpr bool sofa::core::TVecId< vtype, vaccess >::isNull ( ) const
inlineconstexpr

◆ null()

template<VecType vtype, VecAccess vaccess>
static constexpr TVecId sofa::core::TVecId< vtype, vaccess >::null ( )
inlinestaticconstexpr

◆ operator!=()

template<VecType vtype, VecAccess vaccess>
template<VecType vtype2, VecAccess vaccess2>
constexpr bool sofa::core::TVecId< vtype, vaccess >::operator!= ( const TVecId< vtype2, vaccess2 > &  v) const
inlineconstexpr

◆ operator=() [1/3]

template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
constexpr TVecId<vtype, vaccess>& sofa::core::TVecId< vtype, vaccess >::operator= ( const TVecId< V_ALL, vaccess2 > &  other)
inlineconstexpr

◆ operator=() [2/3]

template<VecType vtype, VecAccess vaccess>
constexpr TVecId<vtype, vaccess>& sofa::core::TVecId< vtype, vaccess >::operator= ( const TVecId< vtype, vaccess > &  other)
inlineconstexpr

◆ operator=() [3/3]

template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
constexpr TVecId<vtype, vaccess>& sofa::core::TVecId< vtype, vaccess >::operator= ( const TVecId< vtype, vaccess2 > &  other)
inlineconstexpr

◆ operator==()

template<VecType vtype, VecAccess vaccess>
template<VecType vtype2, VecAccess vaccess2>
constexpr bool sofa::core::TVecId< vtype, vaccess >::operator== ( const TVecId< vtype2, vaccess2 > &  v) const
inlineconstexpr

◆ state()

template<VecType vtype, VecAccess vaccess>
template<State v_state>
static constexpr TVecId sofa::core::TVecId< vtype, vaccess >::state ( )
inlinestaticconstexpr

Related details

◆ operator<<

template<VecType vtype, VecAccess vaccess>
std::ostream& operator<< ( std::ostream &  out,
const TVecId< vtype, vaccess > &  v 
)
friend