boost::log::expressions::attribute_actor
// In header: <boost/log/expressions/attr.hpp> template<typename T, typename FallbackPolicyT, typename TagT, template< typename > class ActorT> class attribute_actor : public ActorT< attribute_terminal< T, FallbackPolicyT, TagT > > { public: // types typedef TagT tag_type; // Attribute tag type. typedef FallbackPolicyT fallback_policy; // Fallback policy. typedef attribute_terminal< T, fallback_policy, tag_type > terminal_type; // Base terminal type. typedef terminal_type::value_type value_type; // Attribute value type. typedef ActorT< terminal_type > base_type; // Base actor type. typedef attribute_actor< value_type, fallback_to_none, tag_type, ActorT > or_none_result_type; // Expression with cached attribute name. typedef attribute_actor< value_type, fallback_to_throw, tag_type, ActorT > or_throw_result_type; // Expression with cached attribute name. // construct/copy/destruct explicit attribute_actor(base_type const &); // public member functions attribute_name get_name() const; fallback_policy const & get_fallback_policy() const; or_none_result_type or_none() const; or_throw_result_type or_throw() const; template<typename DefaultT> attribute_actor< value_type, fallback_to_default< DefaultT >, tag_type, ActorT > or_default(DefaultT const &) const; };
An attribute value extraction terminal actor
attribute_actor
public member functionsattribute_name get_name() const;
Returns: |
The attribute name |
fallback_policy const & get_fallback_policy() const;
Returns: |
Fallback policy |
or_none_result_type or_none() const;Generates an expression that extracts the attribute value or a default value.
or_throw_result_type or_throw() const;Generates an expression that extracts the attribute value or throws an exception.
template<typename DefaultT> attribute_actor< value_type, fallback_to_default< DefaultT >, tag_type, ActorT > or_default(DefaultT const & def_val) const;Generates an expression that extracts the attribute value or a default value.