franta-hg@28: /**
franta-hg@28: * parameter-lister
franta-hg@28: * Copyright © 2015 František Kučera (frantovo.cz)
franta-hg@28: *
franta-hg@28: * This program is free software: you can redistribute it and/or modify
franta-hg@28: * it under the terms of the GNU General Public License as published by
franta-hg@28: * the Free Software Foundation, either version 3 of the License, or
franta-hg@28: * (at your option) any later version.
franta-hg@28: *
franta-hg@28: * This program is distributed in the hope that it will be useful,
franta-hg@28: * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@28: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@28: * GNU General Public License for more details.
franta-hg@28: *
franta-hg@28: * You should have received a copy of the GNU General Public License
franta-hg@28: * along with this program. If not, see .
franta-hg@28: */
franta-hg@18: #include
franta-hg@18:
franta-hg@7: #include "TerminalOutputModule.h"
franta-hg@16: #include "terminalCodes/TerminalCodes.h"
franta-hg@7:
franta-hg@8: namespace info {
franta-hg@8: namespace globalcode {
franta-hg@8: namespace parameterLister {
franta-hg@8:
franta-hg@16: int TerminalOutputModule::process(std::ostream &output, std::string &command, std::vector &args) {
franta-hg@11: using namespace std;
franta-hg@16:
franta-hg@16: terminalCodes::Modifier fgGreen(terminalCodes::FG_GREEN);
franta-hg@16: terminalCodes::Modifier fgReset(terminalCodes::FG_DEFAULT);
franta-hg@16:
franta-hg@26: output << fgGreen << "terminalOutputModule >>>" << fgReset << endl;
franta-hg@11:
franta-hg@20: for_each(args.begin(), args.end(), [this, &output, command, fgGreen, fgReset](string s) {
franta-hg@26: output << fgGreen << colorize(RED, command) << fgReset << ": " << escapeValue(s, true) << endl;
franta-hg@18: });
franta-hg@11:
franta-hg@26: output << fgGreen << "<<< terminalOutputModule" << fgReset << endl;
franta-hg@16:
franta-hg@16: return 0;
franta-hg@8: }
franta-hg@8:
franta-hg@9: }
franta-hg@9: }
franta-hg@9: }
franta-hg@9: