diff -r a4c3f27b6be7 -r 1581a99ab33f c++/parameter-lister/info/globalcode/parameterLister/terminalCodes/TerminalCodes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c++/parameter-lister/info/globalcode/parameterLister/terminalCodes/TerminalCodes.h Sun May 03 18:08:40 2015 +0200 @@ -0,0 +1,41 @@ +#ifndef COLORZ_H +#define COLORZ_H + +#include + +namespace info { +namespace globalcode { +namespace parameterLister { +namespace terminalCodes { + +enum Code { + FG_RED = 31, + FG_GREEN = 32, + FG_BLUE = 34, + FG_DEFAULT = 39, + BG_RED = 41, + BG_GREEN = 42, + BG_BLUE = 44, + BG_DEFAULT = 49 +}; + +class Modifier { + Code code; +public: + + Modifier(Code code) : code(code) { + } + + friend std::ostream& + operator<<(std::ostream& os, const Modifier& mod) { + return os << "\033[" << mod.code << "m"; + } +}; + +} +} +} +} + +#endif /* COLORZ_H */ +