diff -r 584f60104c13 -r 6e5c4e267ddb c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h Sat Sep 10 23:52:37 2016 +0200 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h Sun Sep 11 00:00:21 2016 +0200 @@ -1,7 +1,8 @@ #ifndef TERMINALOUTPUTMODULE_H -#define TERMINALOUTPUTMODULE_H +#define TERMINALOUTPUTMODULE_H #include +#include #include "OutputModule.h" @@ -9,16 +10,30 @@ namespace globalcode { namespace parameterLister { +using namespace std; + class TerminalOutputModule : public OutputModule { public: - virtual int process(std::ostream &output, std::string &command, std::vector &args); + virtual int process(ostream &output, string &command, vector &args); private: + const int RED = 31; + const int GREEN = 32; + const int BLUE = 34; + + string colorize(int foreground, string text) { + //return "\033[" + "32" + "m" + text + "\033[39m"; + ostringstream fgStream; + fgStream << foreground; + return "\033[" + fgStream.str() + "m" + text + "\033[39m"; + } + + // tabulky: http://www.rubydoc.info/gems/terminal-table/1.4.2/frames }; } } } -#endif /* TERMINALOUTPUTMODULE_H */ +#endif /* TERMINALOUTPUTMODULE_H */