## Class dynamic_type_dispatcher

boost::log::dynamic_type_dispatcher — A dynamic type dispatcher.

## Synopsis

    // In header: <boost/log/utility/type_dispatch/dynamic_type_dispatcher.hpp>

    class dynamic_type_dispatcher : public type_dispatcher {
    public:

      // public member functions
      dynamic_type_dispatcher();
      dynamic_type_dispatcher(dynamic_type_dispatcher const &);
      dynamic_type_dispatcher & operator=(dynamic_type_dispatcher const &);
      template<typename T, typename VisitorT> void register_type(VisitorT const &);
      dispatching_map::size_type registered_types_count() const;
    };

## Description

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.

### `dynamic_type_dispatcher` public member functions

1.     dynamic_type_dispatcher();

   Default constructor

2.     dynamic_type_dispatcher(dynamic_type_dispatcher const & that);

   Copy constructor

3.     dynamic_type_dispatcher & operator=(dynamic_type_dispatcher const & that);

   Copy assignment

4.     template<typename T, typename VisitorT>
         void register_type(VisitorT const & visitor);

   The method registers a new type

   Parameters:

   `visitor` | Function object that will be associated with the type `T`

5.     dispatching_map::size_type registered_types_count() const;

   The method returns the number of registered types