Boost C++ Libraries

PrevUpHomeNext

Class template flt_has_attr<CharT, void>

boost::log::filters::flt_has_attr<CharT, void> — A filter that detects if there is an attribute with given name in the complete attribute view.

Synopsis

// In header: <boost/log/filters/has_attr.hpp>

template<typename CharT> 
class flt_has_attr<CharT, void> :
  public basic_filter< CharT, flt_has_attr< CharT, void > >
{
public:
  // types
  typedef base_type::values_view_type values_view_type;  // Attribute values container type. 
  typedef base_type::char_type        char_type;         // Char type. 
  typedef base_type::string_type      string_type;       // String type. 

  // public member functions
   flt_has_attr(string_type const &);
  bool operator()(values_view_type const &) const;
};

Description

The specialization is used when an attribute value of any type is sought.

flt_has_attr public member functions

  1.  flt_has_attr(string_type const & name);

    Constructs the filter

    Parameters:
    name

    Attribute name

  2. bool operator()(values_view_type const & values) const;

    Applies the filter

    Parameters:
    values

    A set of attribute values of a single log record

    Returns:

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


PrevUpHomeNext