SOFA API  1c8b807d
Open source framework for multi-physics simuation
sofa::helper::BasicDispatcher< BaseClass, ResulT > Class Template Reference

#include <FnDispatcher.h>

Inheritance diagram for sofa::helper::BasicDispatcher< BaseClass, ResulT >:

Protected Attributes

MapType callBackMap
 

Public Member Functions

void add (const std::type_info &class1, const std::type_info &class2, F fun)
 
void ignore (const std::type_info &class1, const std::type_info &class2)
 
template<class ConcreteClass1 , class ConcreteClass2 , ResulT(*)(ConcreteClass1 &, ConcreteClass2 &) F, bool symmetric>
void ignore ()
 
virtual ResulT defaultFn (BaseClass &arg1, BaseClass &arg2)
 
ResulT go (BaseClass &arg1, BaseClass &arg2)
 
bool isSupported (BaseClass &arg1, BaseClass &arg2)
 Return true if a pair of argument correspond to a callback function (different than ignoreFn) More...
 

Static Public Member Functions

static ResulT ignoreFn (BaseClass &arg1, BaseClass &arg2)
 

Protected Member Functions

virtual ~BasicDispatcher ()
 

Attribute details

◆ callBackMap

template<class BaseClass , typename ResulT = void>
MapType sofa::helper::BasicDispatcher< BaseClass, ResulT >::callBackMap
protected

Constructor details

◆ ~BasicDispatcher()

template<class BaseClass , typename ResulT = void>
virtual sofa::helper::BasicDispatcher< BaseClass, ResulT >::~BasicDispatcher ( )
inlineprotectedvirtual

Function details

◆ add()

template<class BaseClass , typename ResulT >
void sofa::helper::BasicDispatcher< BaseClass, ResulT >::add ( const std::type_info &  class1,
const std::type_info &  class2,
F  fun 
)

◆ defaultFn()

template<class BaseClass , typename ResulT >
ResulT sofa::helper::BasicDispatcher< BaseClass, ResulT >::defaultFn ( BaseClass &  arg1,
BaseClass &  arg2 
)
virtual

◆ go()

template<class BaseClass , typename ResulT >
ResulT sofa::helper::BasicDispatcher< BaseClass, ResulT >::go ( BaseClass &  arg1,
BaseClass &  arg2 
)

◆ ignore() [1/2]

template<class BaseClass , typename ResulT = void>
template<class ConcreteClass1 , class ConcreteClass2 , ResulT(*)(ConcreteClass1 &, ConcreteClass2 &) F, bool symmetric>
void sofa::helper::BasicDispatcher< BaseClass, ResulT >::ignore ( )
inline

◆ ignore() [2/2]

template<class BaseClass , typename ResulT >
void sofa::helper::BasicDispatcher< BaseClass, ResulT >::ignore ( const std::type_info &  class1,
const std::type_info &  class2 
)

◆ ignoreFn()

template<class BaseClass , typename ResulT >
ResulT sofa::helper::BasicDispatcher< BaseClass, ResulT >::ignoreFn ( BaseClass &  arg1,
BaseClass &  arg2 
)
static

◆ isSupported()

template<class BaseClass , typename ResulT >
bool sofa::helper::BasicDispatcher< BaseClass, ResulT >::isSupported ( BaseClass &  arg1,
BaseClass &  arg2 
)

Return true if a pair of argument correspond to a callback function (different than ignoreFn)