c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp
author František Kučera <franta-hg@frantovo.cz>
Mon, 04 May 2015 00:16:12 +0200
changeset 12 fde958908539
parent 11 870b868b6b57
child 14 d81d0a119e76
permissions -rw-r--r--
remove constructors
     1 #include <algorithm>
     2 
     3 #include "OutputModule.h"
     4 #include "terminalCodes/TerminalCodes.h"
     5 
     6 namespace info {
     7 namespace globalcode {
     8 namespace parameterLister {
     9 
    10 void OutputModule::process(std::ostream &output, std::string &command, std::vector<std::string> &args) {
    11 	terminalCodes::Modifier fgGreen(terminalCodes::FG_GREEN);
    12 	terminalCodes::Modifier fgReset(terminalCodes::FG_DEFAULT);
    13 
    14 	using namespace std;
    15 
    16 	output << "<outputModule>" << endl;
    17 
    18 	for_each(args.begin(), args.end(), [command, fgGreen, fgReset](string s) {
    19 		cout << fgGreen << command << fgReset << ": " << s << endl;
    20 	});
    21 	
    22 	output << "</outputModule>" << endl;
    23 }
    24 
    25 
    26 }
    27 }
    28 }
    29