SOFA API  1e111313
Open source framework for multi-physics simuation
sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags > Class Template Reference

#include <Link.h>

Container of vectors of links in the scenegraph, from a given type of object (Owner) to another (Dest) More...

Inheritance diagram for sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >:

Detailed Description

template<class TOwnerType, class TDestType, unsigned TFlags>
class sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >

Container of vectors of links in the scenegraph, from a given type of object (Owner) to another (Dest)

Protected Attributes

ValidatorFn m_validator
 

Public Member Functions

 MultiLink (const BaseLink::InitLink< OwnerType > &init)
 
 MultiLink (const BaseLink::InitLink< OwnerType > &init, DestPtr val)
 
virtual ~MultiLink ()
 
void setValidator (ValidatorFn fn)
 
virtual bool updateLinks ()
 
DestTypeget (std::size_t index, const core::ExecParams *) const
 
DestTypeget (std::size_t index) const
 
DestTypeoperator[] (std::size_t index) const
 

Static Public Member Functions

template<class TContext >
static bool CheckPaths (const std::string &str, TContext *context)
 Check that a given list of path is valid, that the pointed object exists and is of the right type. More...
 

Protected Member Functions

void added (DestPtr val, std::size_t index)
 
void removed (DestPtr val, std::size_t index)
 

Attribute details

template<class TOwnerType, class TDestType, unsigned TFlags>
ValidatorFn sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::m_validator
protected

Constructor details

template<class TOwnerType, class TDestType, unsigned TFlags>
sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::MultiLink ( const BaseLink::InitLink< OwnerType > &  init)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::MultiLink ( const BaseLink::InitLink< OwnerType > &  init,
DestPtr  val 
)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
virtual sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::~MultiLink ( )
inlinevirtual

Function details

template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::added ( DestPtr  val,
std::size_t  index 
)
inlineprotectedvirtual
template<class TOwnerType, class TDestType, unsigned TFlags>
template<class TContext >
static bool sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::CheckPaths ( const std::string &  str,
TContext *  context 
)
inlinestatic

Check that a given list of path is valid, that the pointed object exists and is of the right type.

template<class TOwnerType, class TDestType, unsigned TFlags>
DestType* sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::get ( std::size_t  index,
const core::ExecParams  
) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
DestType* sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::get ( std::size_t  index) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
DestType* sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::operator[] ( std::size_t  index) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::removed ( DestPtr  val,
std::size_t  index 
)
inlineprotectedvirtual
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::setValidator ( ValidatorFn  fn)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
virtual bool sofa::core::objectmodel::MultiLink< TOwnerType, TDestType, TFlags >::updateLinks ( )
inlinevirtual

Update pointers in case the pointed-to objects have appeared

Returns
false if there are broken links

Implements sofa::core::objectmodel::BaseLink.