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

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

Static Public Member Functions

static 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
 BaseVecId (VecType t, unsigned int i)
 

Constructor details

◆ TVecId() [1/5]

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

◆ TVecId() [2/5]

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

◆ TVecId() [3/5]

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

Copy constructor.

◆ TVecId() [4/5]

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

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>
sofa::core::TVecId< vtype, vaccess >::TVecId ( const TVecId< V_ALL, vaccess2 > &  v)
inlineexplicit

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>
bool sofa::core::TVecId< vtype, vaccess >::isNull ( ) const
inline

◆ null()

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

◆ operator!=()

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

◆ operator=() [1/3]

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

◆ operator=() [2/3]

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

◆ operator=() [3/3]

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

◆ operator==()

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

Related details

◆ operator<<

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