opm-common
Loading...
Searching...
No Matches
Opm::SimpleMessageFormatter Class Reference

A simple formatter capable of adding message prefixes and colors. More...

#include <MessageFormatter.hpp>

Inheritance diagram for Opm::SimpleMessageFormatter:
Opm::MessageFormatterInterface

Public Member Functions

 SimpleMessageFormatter (const bool use_prefix, const bool use_color_coding)
 Constructor controlling formatting to be applied.
 SimpleMessageFormatter (const int64_t prefix_flag, const bool use_color_coding)
 SimpleMessageFormatter (const bool use_color_coding)
virtual std::string format (const int64_t message_flag, const std::string &message) override
 Returns a copy of the input string with a flag-dependant prefix (if use_prefix) and the entire message in a flag-dependent color (if use_color_coding).
Public Member Functions inherited from Opm::MessageFormatterInterface
virtual ~MessageFormatterInterface ()=default
 Virtual destructor to enable inheritance.

Detailed Description

A simple formatter capable of adding message prefixes and colors.

Member Function Documentation

◆ format()

virtual std::string Opm::SimpleMessageFormatter::format ( const int64_t message_flag,
const std::string & message )
inlineoverridevirtual

Returns a copy of the input string with a flag-dependant prefix (if use_prefix) and the entire message in a flag-dependent color (if use_color_coding).

Implements Opm::MessageFormatterInterface.


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