![]() |
nomlib
|
#include <UnixConsoleOutput.hpp>
Public Member Functions | |
| virtual | ~UnixConsoleOutput () |
| Destructor; if a TTY device is detected, an attempt to reset the colors will be made. | |
| void | set_color (ConsoleOutput::Color color) |
| Implements ConsoleOutput::set_color. | |
| void | set_style (uint32 style) |
| Implements ConsoleOutput::set_style. | |
| void | endl () |
| Implements ConsoleOutput::reset_colors. | |
| Public Member Functions inherited from nom::ConsoleOutput | |
| ConsoleOutput () | |
| Default constructor; initializes the output stream to use std::cerr (the standard error stream). | |
| ConsoleOutput (std::ostream &os) | |
| Construct a console output object with a custom output stream. | |
| ConsoleOutput::Color | color () const |
| Get the last color that was set. | |
| bool | use_color () const |
| Get the current use state of colored output logging. | |
Private Member Functions | |
| bool | tty () const |
| Check to see if we are running inside a TTY device (terminal). | |
Private Attributes | |
| const std::string | COLOR_ENDL = "\033[0m" |
| Reset colors. | |
| const std::string | COLOR_FG_RED = "\033[31m" |
| const std::string | COLOR_FG_BLUE = "\033[34m" |
| const std::string | COLOR_FG_YELLOW = "\033[93m" |
| const std::string | COLOR_FG_MAGENTA = "\033[35m" |
| const std::string | COLOR_FG_GREEN = "\033[0;32m" |
| const std::string | COLOR_FG_ORANGE = "\033[0;33m" |
| const std::string | COLOR_FG_PURPLE = "\033[0;35m" |
| const std::string | COLOR_STYLE_BOLD = "\033[1;1m" |
| const std::string | COLOR_STYLE_UNDERLINED = "\033[1;4m" |
Additional Inherited Members | |
| Public Types inherited from nom::ConsoleOutput | |
| enum | Color { FG_WHITE , FG_RED , FG_GREEN , FG_BLUE , FG_MAGENTA , FG_YELLOW , FG_ORANGE , FG_PURPLE } |
| enum | : uint32 { STYLE_NONE = 0 , STYLE_BOLD = 0x1 , STYLE_UNDERLINED = 0x2 } |
| Protected Attributes inherited from nom::ConsoleOutput | |
| std::ostream & | out_ |
| The output stream to use; i.e.: std::cout or std::cerr. | |
| ConsoleOutput::Color | lcolor_ |
| The last color used. | |
Definition at line 43 of file UnixConsoleOutput.hpp.
|
virtual |
Implements ConsoleOutput::reset_colors.
Reimplemented from nom::ConsoleOutput.
|
virtual |
Implements ConsoleOutput::set_color.
Reimplemented from nom::ConsoleOutput.
|
virtual |
Implements ConsoleOutput::set_style.
Reimplemented from nom::ConsoleOutput.
|
private |
Check to see if we are running inside a TTY device (terminal).
|
private |
Reset colors.
Definition at line 68 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 72 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 76 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 74 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 77 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 78 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 70 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 73 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 80 of file UnixConsoleOutput.hpp.
|
private |
Definition at line 81 of file UnixConsoleOutput.hpp.