c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp
changeset 11 870b868b6b57
parent 9 598a575ae57f
child 12 fde958908539
     1.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp	Sun May 03 23:41:43 2015 +0200
     1.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp	Mon May 04 00:12:33 2015 +0200
     1.3 @@ -1,4 +1,7 @@
     1.4 +#include <algorithm>
     1.5 +
     1.6  #include "OutputModule.h"
     1.7 +#include "terminalCodes/TerminalCodes.h"
     1.8  
     1.9  namespace info {
    1.10  namespace globalcode {
    1.11 @@ -13,8 +16,19 @@
    1.12  OutputModule::~OutputModule() {
    1.13  }
    1.14  
    1.15 -void OutputModule::process(std::ostream &output) {
    1.16 -	output << "OutputModule!" << std::endl;
    1.17 +void OutputModule::process(std::ostream &output, std::string &command, std::vector<std::string> &args) {
    1.18 +	terminalCodes::Modifier fgGreen(terminalCodes::FG_GREEN);
    1.19 +	terminalCodes::Modifier fgReset(terminalCodes::FG_DEFAULT);
    1.20 +
    1.21 +	using namespace std;
    1.22 +
    1.23 +	output << "<outputModule>" << endl;
    1.24 +
    1.25 +	for_each(args.begin(), args.end(), [command, fgGreen, fgReset](string s) {
    1.26 +		cout << fgGreen << command << fgReset << ": " << s << endl;
    1.27 +	});
    1.28 +	
    1.29 +	output << "</outputModule>" << endl;
    1.30  }
    1.31  
    1.32