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

#include <Link.h>

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

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

Detailed Description

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

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

Protected Attributes

ValidatorFn m_validator
 

Public Member Functions

 SingleLink ()
 
 SingleLink (const BaseLink::InitLink< OwnerType > &init)
 
 SingleLink (const BaseLink::InitLink< OwnerType > &init, DestPtr val)
 
virtual ~SingleLink ()
 
void setValidator (ValidatorFn fn)
 
std::string getPath () const
 
DestTypeget (const core::ExecParams *params=nullptr) const
 
void reset ()
 
void set (DestPtr v)
 
void set (DestPtr v, const std::string &path)
 
void setPath (const std::string &path)
 
virtual bool updateLinks ()
 
 operator DestType * () const
 
DestTypeoperator-> () const
 
DestTypeoperator* () const
 
DestPtr operator= (DestPtr v)
 

Protected Member Functions

void added (DestPtr val, unsigned int)
 
void removed (DestPtr val, unsigned int)
 
void changed (DestPtr before, DestPtr val)
 

Additional Inherited Members

Attribute details

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

Constructor details

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

Function details

template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::added ( DestPtr  val,
unsigned int   
)
inlineprotectedvirtual
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::changed ( DestPtr  before,
DestPtr  val 
)
inlineprotected
template<class TOwnerType, class TDestType, unsigned TFlags>
DestType* sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::get ( const core::ExecParams params = nullptr) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
std::string sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::getPath ( ) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator DestType * ( ) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
DestType& sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator* ( ) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
DestType* sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator-> ( ) const
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
DestPtr sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator= ( DestPtr  v)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::removed ( DestPtr  val,
unsigned int   
)
inlineprotectedvirtual
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::reset ( )
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::set ( DestPtr  v)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::set ( DestPtr  v,
const std::string &  path 
)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::setPath ( const std::string &  path)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::setValidator ( ValidatorFn  fn)
inline
template<class TOwnerType, class TDestType, unsigned TFlags>
virtual bool sofa::core::objectmodel::SingleLink< 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.