...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::record_view — Logging record view class.
// In header: <boost/log/core/record_view.hpp> class record_view { public: // construct/copy/destruct record_view() = default; record_view(record_view const &); record_view(record_view &&); record_view& operator=(record_view const &); record_view& operator=(record_view &&); ~record_view(); // public member functions attribute_value_set const & attribute_values() const; bool operator==(record_view const &) const; bool operator!=(record_view const &) const; bool operator!() const; void swap(record_view &); void reset(); 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 &) const; };
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.
record_view
public
construct/copy/destructrecord_view() = default;
Default constructor. Creates an empty record view that is equivalent to the invalid record handle.
Postconditions: |
|
record_view(record_view const & that);
Copy constructor
record_view(record_view && that);
Move constructor. Source record contents unspecified after the operation.
record_view& operator=(record_view const & that);
Copy assignment
record_view& operator=(record_view && that);
Move assignment. Source record contents unspecified after the operation.
~record_view();
Destructor. Destroys the record, releases any sinks and attribute values that were involved in processing this record.
record_view
public member functionsattribute_value_set const & attribute_values() const;
Requires: |
|
Returns: |
A reference to the set of attribute values attached to this record |
bool operator==(record_view const & that) const;
Equality comparison
Parameters: |
|
||
Returns: |
|
bool operator!=(record_view const & that) const;
Inequality comparison
Parameters: |
|
||
Returns: |
|
bool operator!() const;
Conversion to an unspecified boolean type
Inverted conversion to an unspecified boolean type
Returns: |
|
Returns: |
|
void swap(record_view & that);
Swaps two handles
Parameters: |
|
void reset();
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.
Postconditions: |
|
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.
Parameters: |
|
||
Returns: |
A |