A base class for an attribute value factory. More...
#include <attribute.hpp>
Classes | |
struct | impl |
A base class for an attribute value factory. More... | |
Public Member Functions | |
attribute (attribute const &that) BOOST_NOEXCEPT | |
Default constructor. More... | |
attribute (BOOST_RV_REF(attribute) that) BOOST_NOEXCEPT | |
Move constructor. More... | |
attribute (intrusive_ptr< impl > p) BOOST_NOEXCEPT | |
Initializing constructor. More... | |
attribute & | operator= (BOOST_COPY_ASSIGN_REF(attribute) that) BOOST_NOEXCEPT |
Copy assignment. More... | |
attribute & | operator= (BOOST_RV_REF(attribute) that) BOOST_NOEXCEPT |
Move assignment. More... | |
attribute & | operator= (aux::attribute_set_reference_proxy const &that) BOOST_NOEXCEPT |
bool | operator! () const BOOST_NOEXCEPT |
Verifies that the factory is not in empty state. More... | |
attribute_value | get_value () const |
void | swap (attribute &that) BOOST_NOEXCEPT |
The method swaps two factories (i.e. More... | |
Protected Member Functions | |
impl * | get_impl () const BOOST_NOEXCEPT |
void | set_impl (intrusive_ptr< impl > p) BOOST_NOEXCEPT |
Sets the pointer to the factory implementation. More... | |
Friends | |
template<typename T > | |
T | attribute_cast (attribute const &) |
The function casts one attribute factory to another. More... | |
A base class for an attribute value factory.
Every attribute is represented with a factory that is basically an attribute value generator. The sole purpose of an attribute is to return an actual value when requested. A simplest attribute can always return the same value that it stores internally, but more complex ones can perform a considerable amount of work to return a value, and the returned values may differ each time requested.
A word about thread safety. An attribute should be prepared to be requested a value from multiple threads concurrently.
|
inline |
Default constructor.
Creates an empty attribute value factory, which is not usable until set_impl
is called.
Copy constructor
|
inline |
Move constructor.
References boost::intrusive_ptr< T >::swap().
|
inlineexplicit |
Initializing constructor.
p | Pointer to the implementation. Must not be NULL . |
References boost::multiprecision::backends::p, and boost::intrusive_ptr< T >::swap().
|
inlineprotected |
References boost::intrusive_ptr< T >::get().
Referenced by boost::attribute_cast(), boost::attributes::constant< process_id >::get(), boost::attributes::mutable_constant< channel_type >::get_impl(), and boost::attributes::mutable_constant< T, void, void, void >::get_impl().
attribute_value boost::attribute::get_value | ( | ) | const |
|
inline |
Verifies that the factory is not in empty state.
Verifies that the factory is in empty state
|
inline |
Copy assignment.
Referenced by boost::sources::aux::severity_level< severity_level >::operator=().
|
inline |
Move assignment.
References boost::intrusive_ptr< T >::swap().
|
inline |
References boost::spirit::x3::attr, and boost::swap.
|
inlineprotected |
Sets the pointer to the factory implementation.
p | Pointer to the implementation. Must not be NULL . |
References boost::multiprecision::backends::p, and boost::intrusive_ptr< T >::swap().
Referenced by boost::attributes::counter< T >::counter().
|
inline |
The method swaps two factories (i.e.
their implementations).
References boost::intrusive_ptr< T >::swap().
Referenced by boost::sources::aux::severity_level< severity_level >::operator=(), and boost::sources::basic_severity_logger< BaseT, LevelT >::swap_unlocked().
The function casts one attribute factory to another.