c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp
changeset 18 25a73772efbd
parent 16 65f51abd5fb8
child 20 0684883953ba
     1.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Tue May 05 22:21:20 2015 +0200
     1.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Tue May 05 22:27:59 2015 +0200
     1.3 @@ -1,3 +1,5 @@
     1.4 +#include <algorithm>
     1.5 +
     1.6  #include "TerminalOutputModule.h"
     1.7  #include "terminalCodes/TerminalCodes.h"
     1.8  
     1.9 @@ -13,10 +15,9 @@
    1.10  	
    1.11  	output << fgGreen << "<terminalOutputModule>" << fgReset << endl;
    1.12  	
    1.13 -	for (int i = 0; i < args.size(); i++) {
    1.14 -		string s = args[i];
    1.15 -		output << i + 1 << ":" << s.length() << " = \"" << s << "\"" << endl;
    1.16 -	}
    1.17 +	for_each(args.begin(), args.end(), [&output, command, fgGreen, fgReset](string s) {
    1.18 +		output << fgGreen << command << fgReset << ": " << s << endl;
    1.19 +	});
    1.20  	
    1.21  	output << fgGreen << "</terminalOutputModule>" << fgReset << endl;
    1.22