26 #ifndef LBANN_UTILS_OUTPUT_HELPERS_HPP_INCLUDED 27 #define LBANN_UTILS_OUTPUT_HELPERS_HPP_INCLUDED 50 std::pair<unsigned short, unsigned short>
77 std::ostream&
black(std::ostream&);
80 std::ostream&
red(std::ostream&);
83 std::ostream&
green(std::ostream&);
86 std::ostream&
yellow(std::ostream&);
89 std::ostream&
blue(std::ostream&);
92 std::ostream&
magenta(std::ostream&);
95 std::ostream&
cyan(std::ostream&);
98 std::ostream&
white(std::ostream&);
101 std::ostream&
bgblack(std::ostream&);
104 std::ostream&
bgred(std::ostream&);
107 std::ostream&
bggreen(std::ostream&);
110 std::ostream&
bgyellow(std::ostream&);
113 std::ostream&
bgblue(std::ostream&);
119 std::ostream&
bgcyan(std::ostream&);
122 std::ostream&
bgwhite(std::ostream&);
125 std::ostream&
nocolor(std::ostream&);
134 #endif // LBANN_UTILS_OUTPUT_HELPERS_HPP_INCLUDED std::ostream & bgmagenta(std::ostream &)
Turn the ANSI background color output magenta.
std::ostream & blue(std::ostream &)
Turn the ANSI foreground color output blue.
std::string strip_ansi_csis(std::string const &input)
Remove ANSI CSIs from the string.
std::ostream & clearline(std::ostream &)
Clear remaining characters in the line.
std::ostream & cyan(std::ostream &)
Turn the ANSI foreground color output cyan.
std::pair< unsigned short, unsigned short > get_window_size(std::ostream &os) noexcept
Gets the dimensions of the terminal, if available.
std::ostream & magenta(std::ostream &)
Turn the ANSI foreground color output magenta.
std::ostream & bgcyan(std::ostream &)
Turn the ANSI background color output cyan.
std::ostream & green(std::ostream &)
Turn the ANSI foreground color output green.
std::ostream & black(std::ostream &)
Turn the ANSI foreground color output black.
std::ostream & bggreen(std::ostream &)
Turn the ANSI background color output green.
std::ostream & bgblue(std::ostream &)
Turn the ANSI background color output blue.
std::ostream & white(std::ostream &)
Turn the ANSI foreground color output white.
std::ostream & bgred(std::ostream &)
Turn the ANSI background color output red.
std::string truncate_to_width(std::string const &str, size_t max_len)
A simple utility to replace the tail end of a long string with an ellipsis.
std::ostream & bgyellow(std::ostream &)
Turn the ANSI background color output yellow.
std::ostream & bgwhite(std::ostream &)
Turn the ANSI background color output white.
bool is_good_terminal(std::ostream &os) noexcept
Roughly determines if the stream points to a nice terminal (is a terminal, supports color)...
std::ostream & bgblack(std::ostream &)
Turn the ANSI background color output black.
std::ostream & nocolor(std::ostream &)
Reset the ANSI color to the default.
std::ostream & red(std::ostream &)
Turn the ANSI foreground color output red.
std::ostream & yellow(std::ostream &)
Turn the ANSI foreground color output yellow.