53 mutable std::mutex m_message_mutex;
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
145 void flush()
const { m_stream->flush(); }
152 void message( string_view msg,
int msg_level = 4 )
const;
160 void semaphore(
unsigned ryg, string_view msg,
int msg_level = 0 )
const;
168 void colors(
unsigned c, string_view msg,
int msg_level = 0 )
const;
180 void error( string_view msg )
const;
186 void fatal( string_view msg )
const;
193 void black( string_view msg,
int msg_level = 0 )
const;
200 void red( string_view msg,
int msg_level = 0 )
const;
207 void green( string_view msg,
int msg_level = 0 )
const;
214 void yellow( string_view msg,
int msg_level = 0 )
const;
221 void blue( string_view msg,
int msg_level = 0 )
const;
228 void magenta( string_view msg,
int msg_level = 0 )
const;
235 void cyan( string_view msg,
int msg_level = 0 )
const;
242 void gray( string_view msg,
int msg_level = 0 )
const;
310 m_message_style.s = s; m_message_style.f = f; m_message_style.b = b;
337 m_warning_style.s = s;
338 m_warning_style.f = f;
339 m_warning_style.b = b;
418 #ifndef UTILS_OS_WINDOWS
432 #ifdef UTILS_OS_WINDOWS
~Console()
Destructor.
Definition Console.hxx:90
void set_warning_style(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:332
void setAuto() const
Definition Console.hxx:442
void set_error_style(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:361
void colors(unsigned c, string_view msg, int msg_level=0) const
Output a message with specified colors.
void set_off() const
Definition Console.hxx:417
void setOff() const
Definition Console.hxx:426
void red(string_view msg, int msg_level=0) const
Output a message in red color.
ostream_type * getStream() const
Get the current output stream.
Definition Console.hxx:142
void black_reversed(string_view msg, int msg_level=0) const
Output a message in black reversed color.
void setFatalStyle(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:406
Console(ostream_type *stream=&std::cout, int level=4)
Constructor with stream and level parameters.
void blue(string_view msg, int msg_level=0) const
Output a message in blue color.
void green_reversed(string_view msg, int msg_level=0) const
Output a message in green reversed color.
void blue_reversed(string_view msg, int msg_level=0) const
Output a message in blue reversed color.
void message(string_view msg, int msg_level=4) const
Output a message at a specified level.
void magenta(string_view msg, int msg_level=0) const
Output a message in magenta color.
int getLevel() const
Get the current message level.
Definition Console.hxx:130
Console(Console const &)=delete
Deleted copy constructor.
void setWarningStyle(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:348
void changeStream(ostream_type *new_stream)
Change the output stream.
Definition Console.hxx:118
void error(string_view msg) const
Output an error message.
void yellow_reversed(string_view msg, int msg_level=0) const
Output a message in yellow reversed color.
void set_auto() const
Definition Console.hxx:431
ostream_type * get_stream() const
Get the current output stream.
Definition Console.hxx:136
void gray_reversed(string_view msg, int msg_level=0) const
Output a message in gray reversed color.
Console()=delete
Deleted default constructor.
void setErrorStyle(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:377
void fatal(string_view msg) const
Output a fatal message.
void green(string_view msg, int msg_level=0) const
Output a message in green color.
void changeLevel(int new_level)
Change the message level.
Definition Console.hxx:106
void change_stream(ostream_type *new_stream)
Change the output stream.
Definition Console.hxx:112
void flush() const
Flush the output stream.
Definition Console.hxx:145
void yellow(string_view msg, int msg_level=0) const
Output a message in yellow color.
void set_fatal_style(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:390
void semaphore(unsigned ryg, string_view msg, int msg_level=0) const
Output a semaphore message.
void gray(string_view msg, int msg_level=0) const
Output a message in gray color.
void black(string_view msg, int msg_level=0) const
Output a message in black color.
void cyan_reversed(string_view msg, int msg_level=0) const
Output a message in cyan reversed color.
void red_reversed(string_view msg, int msg_level=0) const
Output a message in red reversed color.
void cyan(string_view msg, int msg_level=0) const
Output a message in cyan color.
void magenta_reversed(string_view msg, int msg_level=0) const
Output a message in magenta reversed color.
void setMessageStyle(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:319
void set_message_style(rang::style const &s, rang::fg const &f, rang::bg const &b)
Definition Console.hxx:305
void warning(string_view msg) const
Output a warning message.
void change_level(int new_level)
Change the message level.
int get_level() const
Get the current message level.
Definition Console.hxx:124
Definition SystemUtils.cc:39
std::basic_istream< char > istream_type
Type for input stream.
Definition Console.hxx:27
std::basic_ostream< char > ostream_type
Type for output stream.
Definition Console.hxx:28
std::string string
Type for string.
Definition Console.hxx:29
string basename(string_view filename)
Get the base name of a file.
@ reset
Definition rang.hxx:47
@ red
Definition rang.hxx:40
@ yellow
Definition rang.hxx:42
@ Auto
Definition rang.hxx:86
@ Off
Definition rang.hxx:85
@ reset
Definition rang.hxx:59
style
Definition rang.hxx:25
@ italic
Definition rang.hxx:29
@ underline
Definition rang.hxx:30
@ reset
Definition rang.hxx:26
@ Auto
Definition rang.hxx:92