A dynamic type dispatcher. More...
#include <dynamic_type_dispatcher.hpp>
Public Member Functions | |
dynamic_type_dispatcher () | |
Default constructor. More... | |
dynamic_type_dispatcher (dynamic_type_dispatcher const &that) | |
Copy constructor. More... | |
dynamic_type_dispatcher & | operator= (dynamic_type_dispatcher const &that) |
Copy assignment. More... | |
template<typename T , typename VisitorT > | |
void | register_type (VisitorT const &visitor) |
The method registers a new type. More... | |
dispatching_map::size_type | registered_types_count () const |
The method returns the number of registered types. More... | |
Protected Types | |
typedef callback_base(* | get_callback_impl_type )(type_dispatcher *, std::type_info const &) |
Pointer to the callback acquisition method. More... | |
Protected Member Functions | |
BOOST_DEFAULTED_FUNCTION (type_dispatcher(type_dispatcher const &that),:m_get_callback_impl(that.m_get_callback_impl){}) public | |
The method requests a callback for the value of type T . More... | |
A dynamic type dispatcher.
The type dispatcher can be used to pass objects of arbitrary types from one component to another. With regard to the library, the type dispatcher can be used to extract attribute values.
The dynamic type dispatcher can be initialized in run time and, therefore, can support different types, depending on runtime conditions. Each supported type is associated with a functional object that will be called when an object of the type is dispatched.
|
protectedinherited |
Pointer to the callback acquisition method.
|
inline |
Default constructor.
|
inline |
Copy constructor.
|
inlineprotectedinherited |
The method requests a callback for the value of type T
.
|
inline |
Copy assignment.
|
inline |
The method registers a new type.
visitor | Function object that will be associated with the type T |
References boost::cref(), boost::make_shared(), and boost::multiprecision::backends::p.
|
inline |
The method returns the number of registered types.