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 basic_filter_factory

boost::log::basic_filter_factory

Synopsis

// In header: <boost/log/utility/setup/filter_parser.hpp>

template<typename CharT, typename AttributeValueT> 
class basic_filter_factory : public boost::log::filter_factory< CharT > {
public:
  // types
  typedef AttributeValueT        value_type;   // The type(s) of the attribute value expected. 
  typedef base_type::string_type string_type;

  // public member functions
  filter on_exists_test(attribute_name const &);
  filter on_equality_relation(attribute_name const &, string_type const &);
  filter on_inequality_relation(attribute_name const &, string_type const &);
  filter on_less_relation(attribute_name const &, string_type const &);
  filter on_greater_relation(attribute_name const &, string_type const &);
  filter on_less_or_equal_relation(attribute_name const &, 
                                   string_type const &);
  filter on_greater_or_equal_relation(attribute_name const &, 
                                      string_type const &);
  filter on_custom_relation(attribute_name const &, string_type const &, 
                            string_type const &);
  value_type parse_argument(string_type const &);
};

Description

The base class for filter factories. The class defines default implementations for most filter expressions. In order to be able to construct filters, the attribute value type must support reading from a stream. Also, the default filters will rely on relational operators for the type, so these operators must also be defined.

basic_filter_factory public member functions

  1. filter on_exists_test(attribute_name const & name);

    The callback for filter for the attribute existence test

  2. filter on_equality_relation(attribute_name const & name, 
                                string_type const & arg);

    The callback for equality relation filter

  3. filter on_inequality_relation(attribute_name const & name, 
                                  string_type const & arg);

    The callback for inequality relation filter

  4. filter on_less_relation(attribute_name const & name, string_type const & arg);

    The callback for less relation filter

  5. filter on_greater_relation(attribute_name const & name, 
                               string_type const & arg);

    The callback for greater relation filter

  6. filter on_less_or_equal_relation(attribute_name const & name, 
                                     string_type const & arg);

    The callback for less or equal relation filter

  7. filter on_greater_or_equal_relation(attribute_name const & name, 
                                        string_type const & arg);

    The callback for greater or equal relation filter

  8. filter on_custom_relation(attribute_name const & name, 
                              string_type const & rel, string_type const & arg);

    The callback for custom relation filter

  9. value_type parse_argument(string_type const & arg);

    The function parses the argument value for a binary relation


PrevUpHomeNext