2015-05-19 21:01:32 +00:00
|
|
|
#ifndef CTOOL_BASE
|
|
|
|
#define CTOOL_BASE
|
2015-05-19 07:01:18 +00:00
|
|
|
|
2015-05-20 05:22:32 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <HECLDatabase.hpp>
|
|
|
|
|
|
|
|
struct SToolPassInfo
|
|
|
|
{
|
|
|
|
std::string pname;
|
|
|
|
std::vector<std::string> args;
|
|
|
|
std::string output;
|
|
|
|
unsigned verbosityLevel = 0;
|
|
|
|
bool force = false;
|
|
|
|
};
|
|
|
|
|
2015-05-19 07:01:18 +00:00
|
|
|
class CToolBase
|
|
|
|
{
|
|
|
|
protected:
|
2015-05-20 05:22:32 +00:00
|
|
|
const SToolPassInfo& m_info;
|
2015-05-19 07:01:18 +00:00
|
|
|
public:
|
2015-05-20 05:22:32 +00:00
|
|
|
CToolBase(const SToolPassInfo& info)
|
|
|
|
: m_info(info) {}
|
2015-05-19 07:01:18 +00:00
|
|
|
virtual ~CToolBase() {}
|
2015-05-20 05:22:32 +00:00
|
|
|
virtual std::string toolName() const=0;
|
|
|
|
virtual int run()=0;
|
2015-05-19 07:01:18 +00:00
|
|
|
};
|
|
|
|
|
2015-05-19 21:01:32 +00:00
|
|
|
#endif // CTOOL_BASE
|