|
OTest2
A C++ testing framework
|
Terminal driver. More...
#include <terminaldriver.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| TerminalDriver (const TerminalDriver &)=delete | |
| TerminalDriver & | operator= (const TerminalDriver &)=delete |
| TerminalDriver (int handle_) | |
| Ctor. More... | |
| ~TerminalDriver () | |
| Dtor. More... | |
| void | setForeground (std::streambuf &buffer_, Color color_) |
| Change the foreground color of the text. More... | |
| void | setBackground (std::streambuf &buffer_, Color color_) |
| Set background color. More... | |
| void | setTextStyle (std::streambuf &buffer_, Style style_) |
| Change the text style. More... | |
| void | cleanAttributes (std::streambuf &buffer_) |
| Clean all previously set terminal attributes. More... | |
Terminal driver.
This is a driver object which allows manipulation with terminal attributes like text color or boldness.
Definition at line 34 of file terminaldriver.h.
|
delete |
|
explicit |
Ctor.
| handle_ | File handle of the output stream. The handle is used to detect whether the output is a terminal and for initialization of the terminfo library. |
Definition at line 350 of file terminaldriver.cpp.
| OTest2::TerminalDriver::~TerminalDriver | ( | ) |
Dtor.
Definition at line 356 of file terminaldriver.cpp.
| void OTest2::TerminalDriver::cleanAttributes | ( | std::streambuf & | buffer_ | ) |
Clean all previously set terminal attributes.
| buffer_ | A stream buffer which the control sequence is written into. |
Definition at line 378 of file terminaldriver.cpp.
|
delete |
| void OTest2::TerminalDriver::setBackground | ( | std::streambuf & | buffer_, |
| Color | color_ | ||
| ) |
Set background color.
| buffer_ | A buffer which the control sequence is written into. |
| color_ | The new background color |
Definition at line 366 of file terminaldriver.cpp.
| void OTest2::TerminalDriver::setForeground | ( | std::streambuf & | buffer_, |
| Color | color_ | ||
| ) |
Change the foreground color of the text.
| buffer_ | A stream buffer which the control sequence is written into. |
| color_ | The new color of the text |
Definition at line 360 of file terminaldriver.cpp.
| void OTest2::TerminalDriver::setTextStyle | ( | std::streambuf & | buffer_, |
| Style | style_ | ||
| ) |
Change the text style.
| buffer_ | A stream buffer which the control sequence is written into. |
Definition at line 372 of file terminaldriver.cpp.
1.8.17