SOFA API  679a9147
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)
 
DestTypeget () const
 
void reset ()
 
void set (DestPtr v)
 
void set (DestPtr v, const std::string &path)
 
void setPath (const std::string &path)
 
 operator DestType * () const
 Convenient operators to make a SingleLink appear as a regular pointer. More...
 
DestTypeoperator-> () const
 
DestTypeoperator* () const
 
DestPtr operator= (DestPtr v)
 

Protected Member Functions

void added (DestPtr val, std::size_t)
 
void removed (DestPtr val, std::size_t)
 
void changed (DestPtr before, DestPtr val)
 

Additional Inherited Members

Attribute details

◆ m_validator

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

Constructor details

◆ SingleLink() [1/3]

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

◆ SingleLink() [2/3]

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

◆ SingleLink() [3/3]

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

◆ ~SingleLink()

template<class TOwnerType , class TDestType , unsigned TFlags>
virtual sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::~SingleLink ( )
inlinevirtual

Function details

◆ added()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::added ( DestPtr  val,
std::size_t   
)
inlineprotectedvirtual

◆ changed()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::changed ( DestPtr  before,
DestPtr  val 
)
inlineprotected

◆ get()

template<class TOwnerType , class TDestType , unsigned TFlags>
DestType* sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::get ( ) const
inline

◆ operator DestType *()

template<class TOwnerType , class TDestType , unsigned TFlags>
sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator DestType * ( ) const
inline

Convenient operators to make a SingleLink appear as a regular pointer.

◆ operator*()

template<class TOwnerType , class TDestType , unsigned TFlags>
DestType& sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator* ( ) const
inline

◆ operator->()

template<class TOwnerType , class TDestType , unsigned TFlags>
DestType* sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator-> ( ) const
inline

◆ operator=()

template<class TOwnerType , class TDestType , unsigned TFlags>
DestPtr sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::operator= ( DestPtr  v)
inline

◆ removed()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::removed ( DestPtr  val,
std::size_t   
)
inlineprotectedvirtual

◆ reset()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::reset ( )
inline

◆ set() [1/2]

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::set ( DestPtr  v)
inline

◆ set() [2/2]

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::set ( DestPtr  v,
const std::string &  path 
)
inline

◆ setPath()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::setPath ( const std::string &  path)
inline

◆ setValidator()

template<class TOwnerType , class TDestType , unsigned TFlags>
void sofa::core::objectmodel::SingleLink< TOwnerType, TDestType, TFlags >::setValidator ( ValidatorFn  fn)
inline