Choreonoid  1.8
Classes | Public Types | Public Member Functions | List of all members
cnoid::PolymorphicFunctionSet< ObjectBase > Class Template Reference

#include <PolymorphicFunctionSet.h>

Classes

class  Dispatcher
 

Public Types

typedef std::function< void(ObjectBase *obj)> Function
 

Public Member Functions

 PolymorphicFunctionSet (HierarchicalClassRegistry< ObjectBase > &registry)
 
bool empty () const
 
void setFunction (const std::type_info &type, Function func)
 
template<class Object >
void setFunction (Function func)
 
template<class Object >
void setFunction (std::function< void(Object *obj)> func)
 
template<class Object >
void resetFunction (bool doUpdate=false)
 
bool updateDispatchTable (int idToCheck=0)
 
int setSuperClassFunction (int id)
 
bool hasFunctionFor (ObjectBase *obj) const
 
void dispatch (ObjectBase *obj, const int id) const
 
void dispatch (ObjectBase *obj) const
 
template<class Object >
void dispatchAs (Object *obj) const
 
Dispatcher dispatcher () const
 

Member Typedef Documentation

◆ Function

template<class ObjectBase >
typedef std::function<void(ObjectBase* obj)> cnoid::PolymorphicFunctionSet< ObjectBase >::Function

Constructor & Destructor Documentation

◆ PolymorphicFunctionSet()

template<class ObjectBase >
cnoid::PolymorphicFunctionSet< ObjectBase >::PolymorphicFunctionSet ( HierarchicalClassRegistry< ObjectBase > &  registry)
inline

Member Function Documentation

◆ dispatch() [1/2]

template<class ObjectBase >
void cnoid::PolymorphicFunctionSet< ObjectBase >::dispatch ( ObjectBase *  obj) const
inline

◆ dispatch() [2/2]

template<class ObjectBase >
void cnoid::PolymorphicFunctionSet< ObjectBase >::dispatch ( ObjectBase *  obj,
const int  id 
) const
inline

◆ dispatchAs()

template<class ObjectBase >
template<class Object >
void cnoid::PolymorphicFunctionSet< ObjectBase >::dispatchAs ( Object *  obj) const
inline

◆ dispatcher()

template<class ObjectBase >
Dispatcher cnoid::PolymorphicFunctionSet< ObjectBase >::dispatcher ( ) const
inline

◆ empty()

template<class ObjectBase >
bool cnoid::PolymorphicFunctionSet< ObjectBase >::empty ( ) const
inline

◆ hasFunctionFor()

template<class ObjectBase >
bool cnoid::PolymorphicFunctionSet< ObjectBase >::hasFunctionFor ( ObjectBase *  obj) const
inline

◆ resetFunction()

template<class ObjectBase >
template<class Object >
void cnoid::PolymorphicFunctionSet< ObjectBase >::resetFunction ( bool  doUpdate = false)
inline

◆ setFunction() [1/3]

template<class ObjectBase >
void cnoid::PolymorphicFunctionSet< ObjectBase >::setFunction ( const std::type_info &  type,
Function  func 
)
inline

◆ setFunction() [2/3]

template<class ObjectBase >
template<class Object >
void cnoid::PolymorphicFunctionSet< ObjectBase >::setFunction ( Function  func)
inline

◆ setFunction() [3/3]

template<class ObjectBase >
template<class Object >
void cnoid::PolymorphicFunctionSet< ObjectBase >::setFunction ( std::function< void(Object *obj)>  func)
inline

◆ setSuperClassFunction()

template<class ObjectBase >
int cnoid::PolymorphicFunctionSet< ObjectBase >::setSuperClassFunction ( int  id)
inline

◆ updateDispatchTable()

template<class ObjectBase >
bool cnoid::PolymorphicFunctionSet< ObjectBase >::updateDispatchTable ( int  idToCheck = 0)
inline

The documentation for this class was generated from the following file: