Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sinks::basic_direct_mapping< MappedT, AttributeValueT > Class Template Reference

Straightforward mapping. More...

#include <attribute_mapping.hpp>

Inheritance diagram for boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >:
Collaboration diagram for boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >:

Public Types

typedef AttributeValueT attribute_value_type
 Attribute contained value type. More...
 
typedef base_type::mapped_type mapped_type
 Mapped value type. More...
 
typedef mapped_type result_type
 Result type. More...
 

Public Member Functions

 basic_direct_mapping (attribute_name const &name, mapped_type const &default_value)
 Constructor. More...
 
mapped_type operator() (record_view const &rec) const
 Extraction operator. More...
 

Detailed Description

template<typename MappedT, typename AttributeValueT = int>
class boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >

Straightforward mapping.

This type of mapping assumes that attribute with a particular name always provides values that map directly onto the native values. The mapping simply returns the extracted attribute value converted to the native value.

Member Typedef Documentation

template<typename MappedT, typename AttributeValueT = int>
typedef AttributeValueT boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >::attribute_value_type

Attribute contained value type.

template<typename MappedT, typename AttributeValueT = int>
typedef base_type::mapped_type boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >::mapped_type

Mapped value type.

template<typename MappedT>
typedef mapped_type boost::sinks::basic_mapping< MappedT >::result_type
inherited

Result type.

Constructor & Destructor Documentation

template<typename MappedT, typename AttributeValueT = int>
boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >::basic_direct_mapping ( attribute_name const &  name,
mapped_type const &  default_value 
)
inlineexplicit

Constructor.

Parameters
nameAttribute name
default_valueThe default native value that is returned if the attribute value is not found

Member Function Documentation

template<typename MappedT, typename AttributeValueT = int>
mapped_type boost::sinks::basic_direct_mapping< MappedT, AttributeValueT >::operator() ( record_view const &  rec) const
inline

Extraction operator.

Parameters
recA log record to extract value from
Returns
An extracted attribute value

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