![]() |
boost::log::attributes::attribute_value_impl — Basic attribute value implementation class.
// In header: <boost/log/attributes/attribute_value_impl.hpp> template<typename T> class attribute_value_impl : public attribute_value::impl { public: // types typedef T value_type; // Value type. // construct/copy/destruct explicit attribute_value_impl(value_type const &); explicit attribute_value_impl(value_type &&); // public member functions virtual bool dispatch(type_dispatcher &); virtual typeindex::type_index get_type() const; value_type const & get() const; };
This class can be used as a boilerplate for simple attribute values. The class implements all needed interfaces of attribute values and allows to store a single value of the type specified as a template parameter. The stored value can be dispatched with type dispatching mechanism.
attribute_value_impl
public member functionsvirtual bool dispatch(type_dispatcher & dispatcher);
Attribute value dispatching method.
Parameters: |
|
||
Returns: |
|
virtual typeindex::type_index get_type() const;
Returns: |
The attribute value type |
value_type const & get() const;
Returns: |
Reference to the contained value. |