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

#include <MultiVecId.h>

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

Detailed Description

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

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

Protected Attributes

MyVecId defaultId
 

Public Member Functions

bool hasIdMap () const
 
const IdMapgetIdMap () const
 
 TMultiVecId ()
 
template<VecAccess vaccess2>
 TMultiVecId (const TVecId< vtype, vaccess2 > &v)
 
template<VecAccess vaccess2>
TMultiVecId< vtype, vaccess > & operator= (const TVecId< vtype, vaccess2 > &v)
 Copy assignment from another VecId. More...
 
 TMultiVecId (const TMultiVecId< vtype, vaccess > &mv)
 
TMultiVecId< vtype, vaccess > & operator= (const TMultiVecId< vtype, vaccess > &mv)
 Copy assignment. More...
 
template<VecAccess vaccess2>
 TMultiVecId (const TMultiVecId< vtype, vaccess2 > &mv)
 
template<VecAccess vaccess2>
TMultiVecId< vtype, vaccess > & operator= (const TMultiVecId< vtype, vaccess2 > &mv)
 
template<VecAccess vaccess2>
 TMultiVecId (const TMultiVecId< V_ALL, vaccess2 > &mv)
 
template<VecAccess vaccess2>
TMultiVecId< vtype, vaccess > & operator= (const TMultiVecId< V_ALL, vaccess2 > &mv)
 
void setDefaultId (const MyVecId &id)
 
template<class State >
void setId (const std::set< State > &states, const MyVecId &id)
 
void setId (const BaseState *s, const MyVecId &id)
 
void assign (const MyVecId &id)
 
const MyVecIdgetId (const BaseState *s) const
 
const MyVecIdgetDefaultId () const
 
std::string getName () const
 
bool isNull () const
 
template<class DataTypes >
StateVecAccessor< DataTypes, vtype, vaccess > operator[] (State< DataTypes > *s) const
 
template<class DataTypes >
StateVecAccessor< DataTypes, vtype, V_READoperator[] (const State< DataTypes > *s) const
 

Static Public Member Functions

static TMultiVecId< vtype, vaccess > null ()
 

Protected Member Functions

IdMapwriteIdMap ()
 

Friends

template<VecType vtype2, VecAccess vaccess2>
class TMultiVecId
 
std::ostream & operator<< (std::ostream &out, const TMultiVecId< vtype, vaccess > &v)
 

Attribute details

template<VecType vtype, VecAccess vaccess>
MyVecId sofa::core::TMultiVecId< vtype, vaccess >::defaultId
protected

Constructor details

template<VecType vtype, VecAccess vaccess>
sofa::core::TMultiVecId< vtype, vaccess >::TMultiVecId ( )
inline
template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
sofa::core::TMultiVecId< vtype, vaccess >::TMultiVecId ( 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.

template<VecType vtype, VecAccess vaccess>
sofa::core::TMultiVecId< vtype, vaccess >::TMultiVecId ( const TMultiVecId< vtype, vaccess > &  mv)
inline
template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
sofa::core::TMultiVecId< vtype, vaccess >::TMultiVecId ( const TMultiVecId< vtype, vaccess2 > &  mv)
inline
template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
sofa::core::TMultiVecId< vtype, vaccess >::TMultiVecId ( const TMultiVecId< V_ALL, vaccess2 > &  mv)
inlineexplicit

Function details

template<VecType vtype, VecAccess vaccess>
void sofa::core::TMultiVecId< vtype, vaccess >::assign ( const MyVecId id)
inline
template<VecType vtype, VecAccess vaccess>
const MyVecId& sofa::core::TMultiVecId< vtype, vaccess >::getDefaultId ( ) const
inline
template<VecType vtype, VecAccess vaccess>
const MyVecId& sofa::core::TMultiVecId< vtype, vaccess >::getId ( const BaseState s) const
inline
template<VecType vtype, VecAccess vaccess>
const IdMap& sofa::core::TMultiVecId< vtype, vaccess >::getIdMap ( ) const
inline
template<VecType vtype, VecAccess vaccess>
std::string sofa::core::TMultiVecId< vtype, vaccess >::getName ( ) const
inline
template<VecType vtype, VecAccess vaccess>
bool sofa::core::TMultiVecId< vtype, vaccess >::hasIdMap ( ) const
inline
template<VecType vtype, VecAccess vaccess>
bool sofa::core::TMultiVecId< vtype, vaccess >::isNull ( ) const
inline
template<VecType vtype, VecAccess vaccess>
static TMultiVecId<vtype, vaccess> sofa::core::TMultiVecId< vtype, vaccess >::null ( )
inlinestatic
template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
TMultiVecId<vtype, vaccess>& sofa::core::TMultiVecId< vtype, vaccess >::operator= ( const TVecId< vtype, vaccess2 > &  v)
inline

Copy assignment from another VecId.

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

Copy assignment.

template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
TMultiVecId<vtype, vaccess>& sofa::core::TMultiVecId< vtype, vaccess >::operator= ( const TMultiVecId< vtype, vaccess2 > &  mv)
inline
template<VecType vtype, VecAccess vaccess>
template<VecAccess vaccess2>
TMultiVecId<vtype, vaccess>& sofa::core::TMultiVecId< vtype, vaccess >::operator= ( const TMultiVecId< V_ALL, vaccess2 > &  mv)
inline
template<VecType vtype, VecAccess vaccess>
template<class DataTypes >
StateVecAccessor<DataTypes,vtype,vaccess> sofa::core::TMultiVecId< vtype, vaccess >::operator[] ( State< DataTypes > *  s) const
inline
template<VecType vtype, VecAccess vaccess>
template<class DataTypes >
StateVecAccessor<DataTypes,vtype,V_READ> sofa::core::TMultiVecId< vtype, vaccess >::operator[] ( const State< DataTypes > *  s) const
inline
template<VecType vtype, VecAccess vaccess>
void sofa::core::TMultiVecId< vtype, vaccess >::setDefaultId ( const MyVecId id)
inline
template<VecType vtype, VecAccess vaccess>
template<class State >
void sofa::core::TMultiVecId< vtype, vaccess >::setId ( const std::set< State > &  states,
const MyVecId id 
)
inline
template<VecType vtype, VecAccess vaccess>
void sofa::core::TMultiVecId< vtype, vaccess >::setId ( const BaseState s,
const MyVecId id 
)
inline
template<VecType vtype, VecAccess vaccess>
IdMap& sofa::core::TMultiVecId< vtype, vaccess >::writeIdMap ( )
inlineprotected

Related details

template<VecType vtype, VecAccess vaccess>
std::ostream& operator<< ( std::ostream &  out,
const TMultiVecId< vtype, vaccess > &  v 
)
friend
template<VecType vtype, VecAccess vaccess>
template<VecType vtype2, VecAccess vaccess2>
friend class TMultiVecId
friend