1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/c++/parameter-lister/info/globalcode/terminalCodes/TerminalCodes.h Sun May 03 02:03:03 2015 +0200
1.3 @@ -0,0 +1,39 @@
1.4 +#ifndef COLORZ_H
1.5 +#define COLORZ_H
1.6 +
1.7 +#include <ostream>
1.8 +namespace info {
1.9 + namespace globalCode {
1.10 + namespace parameterLister {
1.11 + namespace terminalCodes {
1.12 +
1.13 + enum Code {
1.14 + FG_RED = 31,
1.15 + FG_GREEN = 32,
1.16 + FG_BLUE = 34,
1.17 + FG_DEFAULT = 39,
1.18 + BG_RED = 41,
1.19 + BG_GREEN = 42,
1.20 + BG_BLUE = 44,
1.21 + BG_DEFAULT = 49
1.22 + };
1.23 +
1.24 + class Modifier {
1.25 + Code code;
1.26 + public:
1.27 +
1.28 + Modifier(Code code) : code(code) {
1.29 + }
1.30 +
1.31 + friend std::ostream&
1.32 + operator<<(std::ostream& os, const Modifier& mod) {
1.33 + return os << "\033[" << mod.code << "m";
1.34 + }
1.35 + };
1.36 + }
1.37 + }
1.38 + }
1.39 +}
1.40 +
1.41 +#endif /* COLORZ_H */
1.42 +