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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class template has_attribute

boost::log::expressions::has_attribute

Synopsis

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

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

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

  // public member functions
  template<typename ArgT> result_type operator()(ArgT const &) const;
};

Description

An attribute value presence checker.

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. template<typename ArgT> result_type operator()(ArgT const & arg) const;

    Checking operator

    Parameters:

    arg

    A set of attribute values or a log record

    Returns:

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

Specializations


PrevUpHomeNext