ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Logging::DefaultPrintPolicy Class Referencefinal

default print policy for debug messages More...

#include <Acts/Utilities/Logger.hpp>

Inheritance diagram for Acts::Logging::DefaultPrintPolicy:
[legend]
Collaboration diagram for Acts::Logging::DefaultPrintPolicy:
[legend]

Public Member Functions

 DefaultPrintPolicy (std::ostream *out=&std::cout)
 constructor
std::unique_ptr< OutputPrintPolicyclone (const std::string &) const override
 Make a copy of this print policy with a new name.
void flush (const Level &lvl, const std::string &input) final
 flush the debug message to the destination stream
const std::string & name () const override
 Fulfill OutputPrintPolicy interface.
Public Member Functions inherited from Acts::Logging::OutputPrintPolicy
virtual ~OutputPrintPolicy ()=default
 virtual default destructor

Detailed Description

default print policy for debug messages

This class allows to print debug messages without further modifications to a specified output stream.

Constructor & Destructor Documentation

◆ DefaultPrintPolicy()

Acts::Logging::DefaultPrintPolicy::DefaultPrintPolicy ( std::ostream * out = &std::cout)
explicit

constructor

Parameters
[in]outpointer to output stream object
Precondition
out is non-zero

Member Function Documentation

◆ clone()

std::unique_ptr< OutputPrintPolicy > Acts::Logging::DefaultPrintPolicy::clone ( const std::string & ) const
overridevirtual

Make a copy of this print policy with a new name.

Returns
the copy

Implements Acts::Logging::OutputPrintPolicy.

◆ flush()

void Acts::Logging::DefaultPrintPolicy::flush ( const Level & lvl,
const std::string & input )
finalvirtual

flush the debug message to the destination stream

Parameters
[in]lvldebug level of debug message
[in]inputtext of debug message

Implements Acts::Logging::OutputPrintPolicy.

◆ name()

const std::string & Acts::Logging::DefaultPrintPolicy::name ( ) const
overridevirtual

Fulfill OutputPrintPolicy interface.

This policy doesn't actually have a name, so the assumption is that somewhere in the decorator hierarchy, there is something that returns a name without delegating to a wrappee, before reaching this overload.

Note
This method will throw an exception
Returns
the name, but it never returns

Implements Acts::Logging::OutputPrintPolicy.