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@7: #ifndef OUTPUTMODULE_H franta-hg@7: #define OUTPUTMODULE_H franta-hg@7: franta-hg@9: #include franta-hg@11: #include franta-hg@9: franta-hg@8: namespace info { franta-hg@8: namespace globalcode { franta-hg@8: namespace parameterLister { franta-hg@8: franta-hg@20: using namespace std; franta-hg@20: franta-hg@7: class OutputModule { franta-hg@7: public: franta-hg@16: /** franta-hg@16: * franta-hg@20: * @param output franta-hg@20: * @param command franta-hg@20: * @param args franta-hg@20: * @return exit code franta-hg@20: */ franta-hg@20: virtual int process(ostream &output, string &command, vector &args); franta-hg@20: franta-hg@20: protected: franta-hg@20: /** franta-hg@20: * TODO: escape line ends, tabs, esc + deal with unicode/encoding + colorize franta-hg@20: * @param value franta-hg@20: * @param colorize franta-hg@20: * @return franta-hg@20: */ franta-hg@20: virtual string escapeValue(string value, bool colorize); franta-hg@20: franta-hg@7: private: franta-hg@7: franta-hg@7: }; franta-hg@7: franta-hg@8: } franta-hg@8: } franta-hg@8: } franta-hg@8: franta-hg@7: #endif /* OUTPUTMODULE_H */ franta-hg@7: