...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::filter
// In header: <boost/log/expressions/filter.hpp>
class filter {
public:
// types
typedef bool result_type; // Result type.
// member classes/structs/unions
// Default filter, always returns true
.
struct default_filter {
// types
typedef bool result_type;
// public member functions
result_type operator()(attribute_value_set const &) const;
};
// construct/copy/destruct
filter();
filter(filter const &);
filter(filter &&) noexcept;
template<typename FunT> filter(FunT &&);
filter & operator=(filter &&) noexcept;
filter & operator=(filter const &);
template<typename FunT> filter & operator=(FunT const &);
// public member functions
result_type operator()(attribute_value_set const &) const;
void reset();
void swap(filter &) noexcept;
};
Log record filter function wrapper.
filter
public
construct/copy/destructfilter();
Default constructor. Creates a filter that always returns true
.
filter(filter const & that);
Copy constructor
filter(filter && that) noexcept;
Move constructor. The moved-from filter is left in an unspecified state.
template<typename FunT> filter(FunT && fun);
Initializing constructor. Creates a filter which will invoke the specified function object.
filter & operator=(filter && that) noexcept;
Move assignment. The moved-from filter is left in an unspecified state.
filter & operator=(filter const & that);
Copy assignment.
template<typename FunT> filter & operator=(FunT const & fun);
Initializing assignment. Sets the specified function object to the filter.
filter
public member functionsresult_type operator()(attribute_value_set const & values) const;
Filtering operator.
Parameters: |
|
||
Returns: |
|
void reset();
Resets the filter to the default. The default filter always returns true
.
void swap(filter & that) noexcept;
Swaps two filters