Generic attribute value extractor. More...
#include <value_extraction_fwd.hpp>
Public Types | |
typedef FallbackPolicyT | fallback_policy |
Fallback policy. More... | |
typedef T | value_type |
Attribute value types. More... | |
typedef value_ref< value_type, TagT > | result_type |
Function object result type. More... | |
Public Member Functions | |
value_extractor (value_extractor const &that) | |
Default constructor. More... | |
template<typename U > | |
value_extractor (U const &arg) | |
Constructor. More... | |
result_type | operator() (attribute_value const &attr) const |
Extraction operator. More... | |
result_type | operator() (attribute_name const &name, attribute_value_set const &attrs) const |
Extraction operator. More... | |
result_type | operator() (attribute_name const &name, record const &rec) const |
Extraction operator. More... | |
result_type | operator() (attribute_name const &name, record_view const &rec) const |
Extraction operator. More... | |
fallback_policy const & | get_fallback_policy () const |
Generic attribute value extractor.
Attribute value extractor is a functional object that attempts to find and extract the stored attribute value from the attribute values view or a log record. The extracted value is returned from the extractor.
typedef FallbackPolicyT boost::value_extractor< T, FallbackPolicyT, TagT >::fallback_policy |
Fallback policy.
typedef value_ref< value_type, TagT > boost::value_extractor< T, FallbackPolicyT, TagT >::result_type |
Function object result type.
typedef T boost::value_extractor< T, FallbackPolicyT, TagT >::value_type |
Attribute value types.
|
inline |
Default constructor.
Copy constructor
|
inlineexplicit |
Constructor.
arg | Fallback policy constructor argument |
|
inline |
References boost::detail::const.
Referenced by boost::expressions::attribute_terminal< T, FallbackPolicyT, TagT >::get_fallback_policy().
|
inline |
Extraction operator.
Attempts to acquire the stored value of one of the supported types. If extraction succeeds, the extracted value is returned.
attr | The attribute value to extract from. |
References boost::attribute_value::dispatch(), and boost::attribute_value::get_type().
Referenced by boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().
|
inline |
Extraction operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If extraction succeeds, the extracted value is returned.
name | Attribute value name. |
attrs | A set of attribute values in which to look for the specified attribute value. |
References boost::aux::attach_attribute_name_info(), boost::spirit::detail::attribute_value(), boost::attribute_value_set::end(), boost::attribute_value_set::find(), boost::it, and boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().
|
inline |
Extraction operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If extraction succeeds, the extracted value is returned.
name | Attribute value name. |
rec | A log record. The attribute value will be sought among those associated with the record. |
References boost::record::attribute_values(), and boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().
|
inline |
Extraction operator.
Looks for an attribute value with the specified name and tries to acquire the stored value of one of the supported types. If extraction succeeds, the extracted value is returned.
name | Attribute value name. |
rec | A log record view. The attribute value will be sought among those associated with the record. |
References boost::record_view::attribute_values(), and boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().