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