Boost C++ Libraries

PrevUpHomeNext

Class template basic_sink_frontend

boost::log::sinks::basic_sink_frontend — A base class for a logging sink frontend.

Synopsis

// In header: <boost/log/sinks/basic_sink_frontend.hpp>

template<typename CharT> 
class basic_sink_frontend : public boost::log::sinks::sink< CharT > {
public:
  // types
  typedef base_type::char_type                        char_type;               // Character type. 
  typedef base_type::string_type                      string_type;             // String type to be used as a message text holder. 
  typedef base_type::record_type                      record_type;             // Log record type. 
  typedef base_type::values_view_type                 values_view_type;        // Attribute values view type. 
  typedef function1< bool, values_view_type const & > filter_type;             // Filter function type. 
  typedef function0< void >                           exception_handler_type;  // An exception handler type. 

  // construct/copy/destruct
  explicit basic_sink_frontend(implementation *);
  ~basic_sink_frontend();

  // protected member functions
  template<typename T> BOOST_LOG_FORCEINLINE T * get_impl() const;

  // public member functions
  void set_filter(filter_type const &);
  void reset_filter();
  void set_exception_handler(exception_handler_type const &);
  bool will_consume(values_view_type const &);
};

Description

basic_sink_frontend public construct/copy/destruct

  1. explicit basic_sink_frontend(implementation * p);
    The constructor installs the pointer to the frontend implementation.
  2. ~basic_sink_frontend();

    Destructor

basic_sink_frontend protected member functions

  1. template<typename T> BOOST_LOG_FORCEINLINE T * get_impl() const;
    Returns pointer to the frontend implementation data.

basic_sink_frontend public member functions

  1. void set_filter(filter_type const & filter);

    The method sets sink-specific filter functional object

  2. void reset_filter();

    The method resets the filter

  3. void set_exception_handler(exception_handler_type const & handler);

    The method sets an exception handler function

  4. bool will_consume(values_view_type const & attributes);

    The method returns true if no filter is set or the attribute values pass the filter

    Parameters:
    attributes

    A set of attribute values of a logging record


PrevUpHomeNext