...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::static_type_dispatcher — A static type dispatcher class.
// In header: <boost/log/utility/type_dispatch/static_type_dispatcher.hpp> template<typename T> class static_type_dispatcher { public: // construct/copy/destruct template<typename ReceiverT> explicit static_type_dispatcher(ReceiverT &); static_type_dispatcher(static_type_dispatcher const &) = delete; static_type_dispatcher & operator=(static_type_dispatcher const &) = delete; };
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.
Static type dispatchers allow to specify one or several supported types at compile time.
static_type_dispatcher
public
construct/copy/destructtemplate<typename ReceiverT> explicit static_type_dispatcher(ReceiverT & receiver);
Constructor. Initializes the dispatcher internals.
The receiver object is not copied inside the dispatcher, but references to it may be kept by the dispatcher after construction. The receiver object must remain valid until the dispatcher is destroyed.
Parameters: |
|
static_type_dispatcher(static_type_dispatcher const &) = delete;
static_type_dispatcher & operator=(static_type_dispatcher const &) = delete;