c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp
changeset 16 65f51abd5fb8
parent 14 d81d0a119e76
child 18 25a73772efbd
     1.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Mon May 04 00:34:27 2015 +0200
     1.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Tue May 05 22:19:24 2015 +0200
     1.3 @@ -1,19 +1,26 @@
     1.4  #include "TerminalOutputModule.h"
     1.5 +#include "terminalCodes/TerminalCodes.h"
     1.6  
     1.7  namespace info {
     1.8  namespace globalcode {
     1.9  namespace parameterLister {
    1.10  
    1.11 -void TerminalOutputModule::process(std::ostream &output, std::string &command, std::vector<std::string> &args) {
    1.12 +int TerminalOutputModule::process(std::ostream &output, std::string &command, std::vector<std::string> &args) {
    1.13  	using namespace std;
    1.14 -	output << "<terminalOutputModule>" << endl;
    1.15 +	
    1.16 +	terminalCodes::Modifier fgGreen(terminalCodes::FG_GREEN);
    1.17 +	terminalCodes::Modifier fgReset(terminalCodes::FG_DEFAULT);
    1.18 +	
    1.19 +	output << fgGreen << "<terminalOutputModule>" << fgReset << endl;
    1.20  	
    1.21  	for (int i = 0; i < args.size(); i++) {
    1.22  		string s = args[i];
    1.23  		output << i + 1 << ":" << s.length() << " = \"" << s << "\"" << endl;
    1.24  	}
    1.25  	
    1.26 -	output << "</terminalOutputModule>" << endl;
    1.27 +	output << fgGreen << "</terminalOutputModule>" << fgReset << endl;
    1.28 +	
    1.29 +	return 0;
    1.30  }
    1.31  
    1.32  }