JAPAn
Just Another Parity Analyzer
|
A color changing class for the output stream. More...
#include <QwColor.h>
Public Member Functions | |
QwColor (const Qw::EQwColor f=Qw::kDefaultForeground, const Qw::EQwColor b=Qw::kDefaultBackground) | |
Default constructor. | |
virtual | ~QwColor () |
Static Protected Member Functions | |
static QwColorMap | CreateColorMap () |
Static Protected Attributes | |
static QwColorMap | kColorMap = QwColor::CreateColorMap() |
Private Attributes | |
Qw::EQwColor | foreground |
Foreground color. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const QwColor &color) |
Output stream operator. | |
A color changing class for the output stream.
This class changes the color in the output stream by inserting 'magic' escape sequences that are interpreted by smart terminals. On dumb terminals this will probably just print garbage. To use the color, a QwColor object should be streamed to the output stream:
|
inline |
Default constructor.
Definition at line 107 of file QwColor.h.
References foreground, Qw::kDefaultBackground, and Qw::kDefaultForeground.
Referenced by operator<<.
|
inlinestaticprotected |
Definition at line 116 of file QwColor.h.
References BACKBLUE, BACKGREEN, BACKRED, BLACK, BLUE, BOLD, BOLDBLUE, BOLDBROWN, BOLDCYAN, BOLDGREEN, BOLDMAGENTA, BOLDRED, BOLDWHITE, BROWN, CYAN, GREEN, Qw::kBackBlue, Qw::kBackGreen, Qw::kBackRed, Qw::kBlack, Qw::kBlue, Qw::kBold, Qw::kBoldBlue, Qw::kBoldBrown, Qw::kBoldCyan, Qw::kBoldGreen, Qw::kBoldMagenta, Qw::kBoldRed, Qw::kBoldWhite, Qw::kBrown, Qw::kCyan, Qw::kDefaultBackground, Qw::kDefaultForeground, Qw::kGreen, Qw::kMagenta, Qw::kNormal, Qw::kRed, Qw::kWhite, MAGENTA, NORMAL, RED, and WHITE.
|
friend |
Output stream operator.
Definition at line 156 of file QwColor.h.
References foreground, kColorMap, and QwColor().
|
private |
Foreground color.
Definition at line 151 of file QwColor.h.
Referenced by operator<<, and QwColor().
|
staticprotected |
Definition at line 147 of file QwColor.h.
Referenced by operator<<.