Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::value_extractor< T, FallbackPolicyT, TagT > Singleton Reference

Generic attribute value extractor. More...

#include <value_extraction_fwd.hpp>

Inheritance diagram for boost::value_extractor< T, FallbackPolicyT, TagT >:
Collaboration diagram for boost::value_extractor< T, FallbackPolicyT, TagT >:

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
 

Detailed Description

template<typename T, typename FallbackPolicyT, typename TagT>
singleton boost::value_extractor< T, FallbackPolicyT, TagT >

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.

Member Typedef Documentation

template<typename T, typename FallbackPolicyT, typename TagT>
typedef FallbackPolicyT boost::value_extractor< T, FallbackPolicyT, TagT >::fallback_policy

Fallback policy.

template<typename T, typename FallbackPolicyT, typename TagT>
typedef value_ref< value_type, TagT > boost::value_extractor< T, FallbackPolicyT, TagT >::result_type

Function object result type.

template<typename T, typename FallbackPolicyT, typename TagT>
typedef T boost::value_extractor< T, FallbackPolicyT, TagT >::value_type

Attribute value types.

Constructor & Destructor Documentation

template<typename T, typename FallbackPolicyT, typename TagT>
boost::value_extractor< T, FallbackPolicyT, TagT >::value_extractor ( value_extractor< T, FallbackPolicyT, TagT > const &  that)
inline

Default constructor.

Copy constructor

template<typename T, typename FallbackPolicyT, typename TagT>
template<typename U >
boost::value_extractor< T, FallbackPolicyT, TagT >::value_extractor ( U const &  arg)
inlineexplicit

Constructor.

Parameters
argFallback policy constructor argument

Member Function Documentation

template<typename T, typename FallbackPolicyT, typename TagT>
fallback_policy const& boost::value_extractor< T, FallbackPolicyT, TagT >::get_fallback_policy ( ) const
inline
template<typename T, typename FallbackPolicyT, typename TagT>
result_type boost::value_extractor< T, FallbackPolicyT, TagT >::operator() ( attribute_value const &  attr) const
inline

Extraction operator.

Attempts to acquire the stored value of one of the supported types. If extraction succeeds, the extracted value is returned.

Parameters
attrThe attribute value to extract from.
Returns
The extracted value, if extraction succeeded, an empty value otherwise.

References boost::attribute_value::dispatch(), and boost::attribute_value::get_type().

Referenced by boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().

template<typename T, typename FallbackPolicyT, typename TagT>
result_type boost::value_extractor< T, FallbackPolicyT, TagT >::operator() ( attribute_name const &  name,
attribute_value_set const &  attrs 
) const
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.

Parameters
nameAttribute value name.
attrsA set of attribute values in which to look for the specified attribute value.
Returns
The extracted value, if extraction succeeded, an empty value otherwise.

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()().

template<typename T, typename FallbackPolicyT, typename TagT>
result_type boost::value_extractor< T, FallbackPolicyT, TagT >::operator() ( attribute_name const &  name,
record const &  rec 
) const
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.

Parameters
nameAttribute value name.
recA log record. The attribute value will be sought among those associated with the record.
Returns
The extracted value, if extraction succeeded, an empty value otherwise.

References boost::record::attribute_values(), and boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().

template<typename T, typename FallbackPolicyT, typename TagT>
result_type boost::value_extractor< T, FallbackPolicyT, TagT >::operator() ( attribute_name const &  name,
record_view const &  rec 
) const
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.

Parameters
nameAttribute value name.
recA log record view. The attribute value will be sought among those associated with the record.
Returns
The extracted value, if extraction succeeded, an empty value otherwise.

References boost::record_view::attribute_values(), and boost::value_extractor< T, FallbackPolicyT, TagT >::operator()().


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