Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class has_attribute<void>

boost::log::expressions::has_attribute<void>

Synopsis

// In header: <boost/log/expressions/predicates/has_attr.hpp>


class has_attribute<void> {
public:
  // types
  typedef bool result_type;  // Function result_type. 
  typedef void value_type;   // Expected attribute value type. 

  // construct/copy/destruct
  explicit has_attribute(attribute_name const &);

  // public member functions
  result_type operator()(attribute_value_set const &) const;
  result_type operator()(boost::log::record_view const &) const;
};

Description

An attribute value presence checker. This specialization does not check the type of the attribute value.

has_attribute public construct/copy/destruct

  1. explicit has_attribute(attribute_name const & name);

    Initializing constructor

    Parameters:

    name

    Attribute name

has_attribute public member functions

  1. result_type operator()(attribute_value_set const & attrs) const;

    Checking operator

    Parameters:

    attrs

    A set of attribute values

    Returns:

    true if the log record contains the sought attribute value, false otherwise

  2. result_type operator()(boost::log::record_view const & rec) const;

    Checking operator

    Parameters:

    rec

    A log record

    Returns:

    true if the log record contains the sought attribute value, false otherwise


PrevUpHomeNext