Customizable mapping. More...
#include <attribute_mapping.hpp>
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_custom_mapping (attribute_name const &name, mapped_type const &default_value) | |
Constructor. More... | |
mapped_type | operator() (record_view const &rec) const |
Extraction operator. More... | |
reference_proxy | operator[] (attribute_value_type const &key) |
Insertion operator. More... | |
Customizable mapping.
The class allows to setup a custom mapping between an attribute and native values. The mapping should be initialized similarly to the standard map
container, by using indexing operator and assignment.
AttributeValueT
. Type sequences are not supported. typedef AttributeValueT boost::sinks::basic_custom_mapping< MappedT, AttributeValueT >::attribute_value_type |
Attribute contained value type.
typedef base_type::mapped_type boost::sinks::basic_custom_mapping< MappedT, AttributeValueT >::mapped_type |
Mapped value type.
|
inherited |
Result type.
|
inlineexplicit |
Constructor.
name | Attribute name |
default_value | The default native value that is returned if the conversion cannot be performed |
|
inline |
Extraction operator.
Extracts the attribute value and attempts to map it onto the native value.
rec | A log record to extract value from |
|
inline |
Insertion operator.
key | Attribute value to be mapped |