Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::record Class Reference

Logging record class. More...

#include <record.hpp>

Public Member Functions

 record ()
 Default constructor. More...
 
 record (BOOST_RV_REF(record) that) BOOST_NOEXCEPT
 Move constructor. More...
 
 ~record () BOOST_NOEXCEPT
 Destructor. More...
 
recordoperator= (BOOST_RV_REF(record) that) BOOST_NOEXCEPT
 Move assignment. More...
 
attribute_value_setattribute_values () BOOST_NOEXCEPT
 
attribute_value_set const & attribute_values () const BOOST_NOEXCEPT
 
bool operator! () const BOOST_NOEXCEPT
 Conversion to an unspecified boolean type. More...
 
void swap (record &that) BOOST_NOEXCEPT
 Swaps two handles. More...
 
void reset () BOOST_NOEXCEPT
 Resets the log record handle. More...
 
attribute_value_set::mapped_type operator[] (attribute_value_set::key_type name) const
 Attribute value lookup. More...
 
template<typename DescriptorT , template< typename > class ActorT>
result_of::extract< typename
expressions::attribute_keyword
< DescriptorT, ActorT >
::value_type, DescriptorT >
::type 
operator[] (expressions::attribute_keyword< DescriptorT, ActorT > const &keyword) const
 Attribute value lookup. More...
 
BOOST_LOG_API record_view lock ()
 The function ensures that the log record does not depend on any thread-specific data. More...
 

Friends

class core
 

Detailed Description

Logging record class.

The logging record encapsulates all information related to a single logging statement, in particular, attribute values view and the log message string. The record can be updated before pushing for further processing to the logging core.

Constructor & Destructor Documentation

boost::record::record ( )
inline

Default constructor.

Creates an empty record that is equivalent to the invalid record handle.

Postcondition
!*this == true
boost::record::record ( BOOST_RV_REF(record that)
inline

Move constructor.

Source record contents unspecified after the operation.

boost::record::~record ( )
inline

Destructor.

Destroys the record, releases any sinks and attribute values that were involved in processing this record.

References reset().

Member Function Documentation

attribute_value_set& boost::record::attribute_values ( )
inline
Returns
A reference to the set of attribute values attached to this record
Precondition
!!*this

Referenced by boost::value_visitor_invoker< channel_value_type, channel_fallback_policy >::operator()(), boost::value_extractor< T, FallbackPolicyT, TagT >::operator()(), and boost::operator<<().

attribute_value_set const& boost::record::attribute_values ( ) const
inline
Returns
A reference to the set of attribute values attached to this record
Precondition
!!*this
BOOST_LOG_API record_view boost::record::lock ( )

The function ensures that the log record does not depend on any thread-specific data.

Then the record contents are used to construct a record_view which is returned from the function. The record is no longer valid after the call.

Precondition
!!*this
Postcondition
!*this
Returns
The record view that contains all attribute values from the original record.
bool boost::record::operator! ( ) const
inline

Conversion to an unspecified boolean type.

Returns
true, if the *this identifies a log record, false, if the *this is not valid

Inverted conversion to an unspecified boolean type

Returns
false, if the *this identifies a log record, true, if the *this is not valid
record& boost::record::operator= ( BOOST_RV_REF(record that)
inline

Move assignment.

Source record contents unspecified after the operation.

References swap().

attribute_value_set::mapped_type boost::record::operator[] ( attribute_value_set::key_type  name) const
inline

Attribute value lookup.

Parameters
nameAttribute name.
Returns
An attribute_value, non-empty if it is found, empty otherwise.

References boost::iostreams::gzip::flags::name.

template<typename DescriptorT , template< typename > class ActorT>
result_of::extract< typename expressions::attribute_keyword< DescriptorT, ActorT >::value_type, DescriptorT >::type boost::record::operator[] ( expressions::attribute_keyword< DescriptorT, ActorT > const &  keyword) const
inline

Attribute value lookup.

Parameters
keywordAttribute keyword.
Returns
A value_ref with extracted attribute value if it is found, empty value_ref otherwise.
void boost::record::reset ( void  )
inline

Resets the log record handle.

If there are no other handles left, the log record is closed and all resources referenced by the record are released.

Postcondition
!*this == true

References boost::serialization::destroy().

Referenced by ~record().

void boost::record::swap ( record that)
inline

Swaps two handles.

Parameters
thatAnother record to swap with Throws: Nothing

References boost::multiprecision::backends::p.

Referenced by operator=().

Friends And Related Function Documentation

friend class core
friend

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