Boost C++ Libraries

PrevUpHomeNext

Class template attribute_actor

boost::log::expressions::attribute_actor

Synopsis

// In header: <boost/log/expressions/attr_fwd.hpp>

template<typename T, typename FallbackPolicyT, typename TagT, 
         template< typename > class ActorT> 
class attribute_actor :
  public ActorT< attribute_terminal< T, FallbackPolicyT, TagT > >
{
public:

  // public member functions
  explicit attribute_actor(base_type const &);
  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;
};

Description

An attribute value extraction terminal actor

attribute_actor public member functions

  1. explicit attribute_actor(base_type const & act);
    Initializing constructor.
  2. attribute_name get_name() const;

    Returns:

    The attribute name

  3. fallback_policy const & get_fallback_policy() const;

    Returns:

    Fallback policy

  4. or_none_result_type or_none() const;
    Generates an expression that extracts the attribute value or a default value.
  5. or_throw_result_type or_throw() const;
    Generates an expression that extracts the attribute value or throws an exception.
  6. 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.

PrevUpHomeNext