New File tools
This commit is contained in:
@@ -5,10 +5,27 @@
|
||||
|
||||
#include "DawnTool.hpp"
|
||||
|
||||
#if !defined(DAWN_TOOL_INSTANCE)
|
||||
#error Dawn Tool Instance, e.g. LanguageTool has not been defined
|
||||
#endif
|
||||
|
||||
#if !defined(DAWN_TOOL_HEADER)
|
||||
#error Dawn Tool Include, e.g. LanguageTool.hpp has not been defined
|
||||
#endif
|
||||
|
||||
#include DAWN_TOOL_HEADER
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
DawnTool::DawnTool(const int argc, const char *argv[]) {
|
||||
int32_t DawnTool::exec(const int32_t argc, const char *argv[]) {
|
||||
for(int32_t i = 0; i < argc; i++) {
|
||||
this->args.push_back(std::string(argv[i]));
|
||||
}
|
||||
|
||||
return this->start();
|
||||
}
|
||||
|
||||
int main(const int32_t argc, const char *argv[]) {
|
||||
DAWN_TOOL_INSTANCE self;
|
||||
return self.exec(argc, argv);
|
||||
}
|
Reference in New Issue
Block a user