boost::log::attribute — A base class for an attribute.
// In header: <boost/log/attributes/attribute.hpp> struct attribute { // construct/copy/destruct ~attribute(); // public member functions shared_ptr< attribute_value > get_value(); };
An attribute is basically a wrapper for some logic of values acquision. The sole purpose of an attribute is to return an actual value when requested. A simpliest attribute can always return the same value that it stores internally, but more complex species may perform a considirable amount of work to return a value, and their values may differ.
A word about thread safety. An attribute should be prepared to be requested a value from multiple threads concurrently.
attribute
public member functionsshared_ptr< attribute_value > get_value();
Returns: | The actual attribute value. It shall not return NULL (exceptions shall be used to indicate errors). |