...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::expressions::attribute_terminal
// In header: <boost/log/expressions/attr_fwd.hpp> template<typename T, typename FallbackPolicyT, typename TagT> class attribute_terminal { public: // construct/copy/destruct explicit attribute_terminal(attribute_name const &); template<typename U> attribute_terminal(attribute_name const &, U const &); attribute_terminal() = delete; // public member functions attribute_name get_name() const; fallback_policy const & get_fallback_policy() const; template<typename ContextT> result< this_type(ContextT const &) >::type operator()(ContextT const &); template<typename ContextT> result< const this_type(ContextT const &) >::type operator()(ContextT const &) const; };
An attribute value extraction terminal
attribute_terminal
public member functionsattribute_name get_name() const;
Returns: |
Attribute value name |
fallback_policy const & get_fallback_policy() const;
Returns: |
Fallback policy |
template<typename ContextT> result< this_type(ContextT const &) >::type operator()(ContextT const & ctx);
The operator extracts attribute value
template<typename ContextT> result< const this_type(ContextT const &) >::type operator()(ContextT const & ctx) const;
The operator extracts attribute value