author | František Kučera <franta-hg@frantovo.cz> |
Sun, 11 Sep 2016 19:52:26 +0200 | |
changeset 28 | bfef9f34e438 |
parent 20 | 0684883953ba |
permissions | -rw-r--r-- |
franta-hg@28 | 1 |
/** |
franta-hg@28 | 2 |
* parameter-lister |
franta-hg@28 | 3 |
* Copyright © 2015 František Kučera (frantovo.cz) |
franta-hg@28 | 4 |
* |
franta-hg@28 | 5 |
* This program is free software: you can redistribute it and/or modify |
franta-hg@28 | 6 |
* it under the terms of the GNU General Public License as published by |
franta-hg@28 | 7 |
* the Free Software Foundation, either version 3 of the License, or |
franta-hg@28 | 8 |
* (at your option) any later version. |
franta-hg@28 | 9 |
* |
franta-hg@28 | 10 |
* This program is distributed in the hope that it will be useful, |
franta-hg@28 | 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
franta-hg@28 | 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
franta-hg@28 | 13 |
* GNU General Public License for more details. |
franta-hg@28 | 14 |
* |
franta-hg@28 | 15 |
* You should have received a copy of the GNU General Public License |
franta-hg@28 | 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
franta-hg@28 | 17 |
*/ |
franta-hg@7 | 18 |
#ifndef OUTPUTMODULE_H |
franta-hg@7 | 19 |
#define OUTPUTMODULE_H |
franta-hg@7 | 20 |
|
franta-hg@9 | 21 |
#include <iostream> |
franta-hg@11 | 22 |
#include <vector> |
franta-hg@9 | 23 |
|
franta-hg@8 | 24 |
namespace info { |
franta-hg@8 | 25 |
namespace globalcode { |
franta-hg@8 | 26 |
namespace parameterLister { |
franta-hg@8 | 27 |
|
franta-hg@20 | 28 |
using namespace std; |
franta-hg@20 | 29 |
|
franta-hg@7 | 30 |
class OutputModule { |
franta-hg@7 | 31 |
public: |
franta-hg@16 | 32 |
/** |
franta-hg@16 | 33 |
* |
franta-hg@20 | 34 |
* @param output |
franta-hg@20 | 35 |
* @param command |
franta-hg@20 | 36 |
* @param args |
franta-hg@20 | 37 |
* @return exit code |
franta-hg@20 | 38 |
*/ |
franta-hg@20 | 39 |
virtual int process(ostream &output, string &command, vector<string> &args); |
franta-hg@20 | 40 |
|
franta-hg@20 | 41 |
protected: |
franta-hg@20 | 42 |
/** |
franta-hg@20 | 43 |
* TODO: escape line ends, tabs, esc + deal with unicode/encoding + colorize |
franta-hg@20 | 44 |
* @param value |
franta-hg@20 | 45 |
* @param colorize |
franta-hg@20 | 46 |
* @return |
franta-hg@20 | 47 |
*/ |
franta-hg@20 | 48 |
virtual string escapeValue(string value, bool colorize); |
franta-hg@20 | 49 |
|
franta-hg@7 | 50 |
private: |
franta-hg@7 | 51 |
|
franta-hg@7 | 52 |
}; |
franta-hg@7 | 53 |
|
franta-hg@8 | 54 |
} |
franta-hg@8 | 55 |
} |
franta-hg@8 | 56 |
} |
franta-hg@8 | 57 |
|
franta-hg@7 | 58 |
#endif /* OUTPUTMODULE_H */ |
franta-hg@7 | 59 |