Port Scanner
Lightweight TCP port scanner for Linux
|
A utility class for printing formatted output to the terminal. More...
#include <printer.hpp>
Static Public Member Functions | |
static bool | isTerminal () noexcept |
Checks if stdout is connected to a terminal. | |
static void | print (std::vector< std::pair< port_t, bool > > const &ports) |
Prints to stdout the formated information about the ports accessibility. | |
A utility class for printing formatted output to the terminal.
The Printer class provides static methods to check if the output is a terminal and to print port status information with ANSI color formatting.
Definition at line 34 of file printer.hpp.
|
staticnoexcept |
Checks if stdout is connected to a terminal.
Exception safety: No-throw guarantee.
Definition at line 7 of file printer.cpp.
|
static |
Prints to stdout the formated information about the ports accessibility.
Exception safety: Basic guarantee.
std::bad_alloc | If memory allocation for internal storage fails. |
std::system_error | If writing to stdout fails. |
Definition at line 11 of file printer.cpp.