Generic attribute value visitor invoker. More...
#include <value_visitation_fwd.hpp>
Public Types | |
typedef T | value_type |
Attribute value types. More... | |
typedef FallbackPolicyT | fallback_policy |
Fallback policy. More... | |
typedef visitation_result | result_type |
Function object result type. More... | |
Public Member Functions | |
value_visitor_invoker (value_visitor_invoker const &that) | |
Default constructor. More... | |
template<typename U > | |
value_visitor_invoker (U const &arg) | |
Initializing constructor. More... | |
template<typename VisitorT > | |
result_type | operator() (attribute_value const &attr, VisitorT visitor) const |
Visitation operator. More... | |
template<typename VisitorT > | |
result_type | operator() (attribute_name const &name, attribute_value_set const &attrs, VisitorT visitor) const |
Visitation operator. More... | |
template<typename VisitorT > | |
result_type | operator() (attribute_name const &name, record const &rec, VisitorT visitor) const |
Visitation operator. More... | |
template<typename VisitorT > | |
result_type | operator() (attribute_name const &name, record_view const &rec, VisitorT visitor) const |
Visitation operator. More... | |
fallback_policy const & | get_fallback_policy () const |
Generic attribute value visitor invoker.
Attribute value invoker is a functional object that attempts to find and extract the stored attribute value from the attribute value view or a log record. The extracted value is passed to a unary function object (the visitor) provided by user.
The invoker can be specialized on one or several attribute value types that should be specified in the second template argument.
typedef FallbackPolicyT boost::value_visitor_invoker< T, FallbackPolicyT >::fallback_policy |
Fallback policy.
typedef visitation_result boost::value_visitor_invoker< T, FallbackPolicyT >::result_type |
Function object result type.
typedef T boost::value_visitor_invoker< T, FallbackPolicyT >::value_type |
Attribute value types.
|
inline |
Default constructor.
Copy constructor
|
inlineexplicit |
Initializing constructor.
arg | Fallback policy argument |
|
inline |
|
inline |
Visitation operator.
Attempts to acquire the stored value of one of the supported types. If acquisition succeeds, the value is passed to visitor.
attr | An attribute value to apply the visitor to. |
visitor | A receiving function object to pass the attribute value to. |
Referenced by boost::value_visitor_invoker< channel_value_type, channel_fallback_policy >::operator()().
|
inline |
Visitation operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If acquisition succeeds, the value is passed to visitor.
name | Attribute value name. |
attrs | A set of attribute values in which to look for the specified attribute value. |
visitor | A receiving function object to pass the attribute value to. |
|
inline |
Visitation operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If acquisition succeeds, the value is passed to visitor.
name | Attribute value name. |
rec | A log record. The attribute value will be sought among those associated with the record. |
visitor | A receiving function object to pass the attribute value to. |
|
inline |
Visitation operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If acquisition succeeds, the value is passed to visitor.
name | Attribute value name. |
rec | A log record view. The attribute value will be sought among those associated with the record. |
visitor | A receiving function object to pass the attribute value to. |