Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::attributes::attribute_value_impl< T > Class Template Reference

Basic attribute value implementation class. More...

#include <attribute_value_impl.hpp>

Inheritance diagram for boost::attributes::attribute_value_impl< T >:
Collaboration diagram for boost::attributes::attribute_value_impl< T >:

Public Types

typedef T value_type
 Value type. More...
 

Public Member Functions

 attribute_value_impl (value_type const &v)
 Constructor with initialization of the stored value. More...
 
 attribute_value_impl (BOOST_RV_REF(value_type) v)
 Constructor with initialization of the stored value. More...
 
virtual bool dispatch (type_dispatcher &dispatcher)
 Attribute value dispatching method. More...
 
type_info_wrapper get_type () const
 
value_type const & get () const
 
virtual intrusive_ptr< impl > detach_from_thread ()
 The method is called when the attribute value is passed to another thread (e.g. More...
 
virtual attribute_value get_value ()
 

Static Public Member Functions

static BOOST_LOG_API void * operator new (std::size_t size)
 
static BOOST_LOG_API void operator delete (void *p, std::size_t size) BOOST_NOEXCEPT
 

Detailed Description

template<typename T>
class boost::attributes::attribute_value_impl< T >

Basic attribute value implementation class.

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.

Member Typedef Documentation

template<typename T>
typedef T boost::attributes::attribute_value_impl< T >::value_type

Value type.

Constructor & Destructor Documentation

template<typename T>
boost::attributes::attribute_value_impl< T >::attribute_value_impl ( value_type const &  v)
inlineexplicit

Constructor with initialization of the stored value.

Constructor with initialization of the stored value.

Member Function Documentation

virtual intrusive_ptr< impl > boost::attribute_value::impl::detach_from_thread ( )
inlinevirtualinherited

The method is called when the attribute value is passed to another thread (e.g.

in case of asynchronous logging). The value should ensure it properly owns all thread-specific data.

Returns
An actual pointer to the attribute value. It may either point to this object or another. In the latter case the returned pointer replaces the pointer used by caller to invoke this method and is considered to be a functional equivalent to the previous pointer.

Reimplemented in boost::sources::aux::severity_level< LevelT >::impl, and boost::attributes::current_thread_id::impl.

Referenced by boost::attribute_value::detach_from_thread().

template<typename T>
virtual bool boost::attributes::attribute_value_impl< T >::dispatch ( type_dispatcher dispatcher)
inlinevirtual

Attribute value dispatching method.

Parameters
dispatcherThe dispatcher that receives the stored value
Returns
true if the value has been dispatched, false otherwise

Implements boost::attribute_value::impl.

template<typename T>
value_type const& boost::attributes::attribute_value_impl< T >::get ( ) const
inline
Returns
Reference to the contained value.
template<typename T>
type_info_wrapper boost::attributes::attribute_value_impl< T >::get_type ( ) const
inlinevirtual
Returns
The attribute value type

Reimplemented from boost::attribute_value::impl.

virtual attribute_value boost::attribute_value::impl::get_value ( )
inlinevirtualinherited
Returns
The attribute value that refers to self implementation.

Implements boost::attribute::impl.

References boost::attribute_value::attribute_value().

static BOOST_LOG_API void boost::attribute::impl::operator delete ( void *  p,
std::size_t  size 
)
staticinherited
static BOOST_LOG_API void* boost::attribute::impl::operator new ( std::size_t  size)
staticinherited

The documentation for this class was generated from the following file: