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

Logging record view class. More...

#include <record_view.hpp>

Public Member Functions

 record_view (record_view const &that) BOOST_NOEXCEPT
 Default constructor. More...
 
 record_view (BOOST_RV_REF(record_view) that) BOOST_NOEXCEPT
 Move constructor. More...
 
 ~record_view () BOOST_NOEXCEPT
 Destructor. More...
 
record_viewoperator= (BOOST_COPY_ASSIGN_REF(record_view) that) BOOST_NOEXCEPT
 Copy assignment. More...
 
record_viewoperator= (BOOST_RV_REF(record_view) that) BOOST_NOEXCEPT
 Move assignment. More...
 
attribute_value_set const & attribute_values () const BOOST_NOEXCEPT
 
bool operator== (record_view const &that) const BOOST_NOEXCEPT
 Equality comparison. More...
 
bool operator!= (record_view const &that) const BOOST_NOEXCEPT
 Inequality comparison. More...
 
bool operator! () const BOOST_NOEXCEPT
 Conversion to an unspecified boolean type. More...
 
void swap (record_view &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...
 

Friends

class core
 
class record
 Log record placeholder in formatter template expressions. More...
 
struct private_data
 

Detailed Description

Logging record view class.

The logging record encapsulates all information related to a single logging statement, in particular, attribute values view and the log message string. The view is immutable, it is implemented as a wrapper around a reference-counted implementation.

Constructor & Destructor Documentation

boost::record_view::record_view ( record_view const &  that)
inline

Default constructor.

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

Postcondition
!*this == true

Copy constructor

boost::record_view::record_view ( BOOST_RV_REF(record_view that)
inline

Move constructor.

Source record contents unspecified after the operation.

References boost::intrusive_ptr< T >::swap().

boost::record_view::~record_view ( )
inline

Destructor.

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

Member Function Documentation

bool boost::record_view::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
bool boost::record_view::operator!= ( record_view const &  that) const
inline

Inequality comparison.

Parameters
thatComparand
Returns
!(*this == that)

References operator==().

record_view& boost::record_view::operator= ( BOOST_COPY_ASSIGN_REF(record_view that)
inline

Copy assignment.

record_view& boost::record_view::operator= ( BOOST_RV_REF(record_view that)
inline

Move assignment.

Source record contents unspecified after the operation.

References boost::intrusive_ptr< T >::swap().

bool boost::record_view::operator== ( record_view const &  that) const
inline

Equality comparison.

Parameters
thatComparand
Returns
true if both *this and that identify the same log record or both do not identify any record, false otherwise.

Referenced by operator!=().

attribute_value_set::mapped_type boost::record_view::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_view::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_view::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::intrusive_ptr< T >::reset().

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

Friends And Related Function Documentation

friend class core
friend
friend struct private_data
friend
friend class record
friend

Log record placeholder in formatter template expressions.


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