Boost C++ Libraries

PrevUpHomeNext

Class template handle_ordering

boost::log::handle_ordering — Ordering predicate, based on log record handle comparison.

Synopsis

// In header: <boost/log/utility/record_ordering.hpp>

template<typename FunT = aux::less> 
class handle_ordering {
public:
  // types
  typedef bool result_type;  // Result type. 

  // construct/copy/destruct
  handle_ordering();
  explicit handle_ordering(FunT const &);

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

Description

This predicate offers a quick log record ordering based on the log record handles. It is not specified whether one record is less than another, in terms of the predicate, until the actual comparison is performed. Moreover, the ordering may change every time the application runs.

This kind of ordering may be useful if log records are to be stored in an associative container with as least performance overhead as possible.

handle_ordering public construct/copy/destruct

  1. handle_ordering();

    Default constructor. Requires FunT to be default constructible.

  2. explicit handle_ordering(FunT const & fun);

    Initializing constructor. Constructs FunT instance as a copy of the fun argument.

handle_ordering public member functions

  1. template<typename CharT> 
      result_type operator()(basic_record< CharT > const & left, 
                             basic_record< CharT > const & right) const;

    Ordering operator


PrevUpHomeNext