carl  24.04
Computer ARithmetic Library
carl::logging::StreamSink Class Referencefinal

Logging sink that wraps an arbitrary std::ostream. More...

#include <Sink.h>

Inheritance diagram for carl::logging::StreamSink:
Collaboration diagram for carl::logging::StreamSink:

Public Member Functions

 StreamSink (std::ostream &_os)
 Create a StreamSink from some output stream. More...
 
std::ostream & log () noexcept override
 Abstract logging interface. More...
 

Private Attributes

std::ostream os
 Output stream. More...
 

Detailed Description

Logging sink that wraps an arbitrary std::ostream.

It is meant to be used for streams like std::cout or std::cerr.

Definition at line 24 of file Sink.h.

Constructor & Destructor Documentation

◆ StreamSink()

carl::logging::StreamSink::StreamSink ( std::ostream &  _os)
inlineexplicit

Create a StreamSink from some output stream.

Parameters
_osOutput stream.

Definition at line 32 of file Sink.h.

Member Function Documentation

◆ log()

std::ostream& carl::logging::StreamSink::log ( )
inlineoverridevirtualnoexcept

Abstract logging interface.

The intended usage is to write any log output to the output stream returned by this function.

Returns
Output stream.

Implements carl::logging::Sink.

Definition at line 33 of file Sink.h.

Field Documentation

◆ os

std::ostream carl::logging::StreamSink::os
private

Output stream.

Definition at line 26 of file Sink.h.


The documentation for this class was generated from the following file: