Boost C++ Libraries

PrevUpHomeNext

Class record_handle

boost::log::record_handle — A logging record handle class.

Synopsis

// In header: <boost/log/core/record.hpp>


class record_handle {
public:

  // public member functions
  bool operator==(record_handle const &) const;
  bool operator!=(record_handle const &) const;
  bool operator!() const;
  void swap(record_handle &);
  void reset();
  void * get() const;
};

Description

This class is used to identify a log record in calls to the logging core. Consider using the basic_record wrapper class for user-scope needs.

record_handle public member functions

  1. bool operator==(record_handle const & that) const;

    Equality comparison

    Parameters:
    that

    Comparand

    Returns:

    true if both *this and that identify the same log record or do not identify any record, false otherwise.

  2. bool operator!=(record_handle const & that) const;

    Inequality comparison

    Parameters:
    that

    Comparand

    Returns:

    !(*this == that)

  3. bool operator!() const;

    Conversion to an unspecified boolean type

    Inverted conversion to an unspecified boolean type

    Returns:

    true, if the handle identifies a log record, false, if the handle is not valid

    Returns:

    false, if the handle identifies a log record, true, if the handle is not valid

  4. void swap(record_handle & that);

    Swaps two handles

    Parameters:
    that

    Another handle to swap with Throws: Nothing

  5. void reset();

    Resets the log record handle. If there are no other handles left, the log record is closed and all resources referenced by the record are released.

    Postconditions:

    !*this == true

  6. void * get() const;

    Returns a non-NULL pointer if the handle is valid, NULL otherwise.


PrevUpHomeNext