X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;h=22f118164eb04e7d22c0438e3e42c56b79ed0f3d;hb=2009a1a1f47e7467094d844e7c07ab8ddf7bb447;hp=6d734e00b5dd1ef8cc3a4239a8c0b10ad18f8acc;hpb=20a2d0350a737a434c89f303662d64a8eeea7b05;p=mothur.git diff --git a/command.hpp b/command.hpp index 6d734e0..22f1181 100644 --- a/command.hpp +++ b/command.hpp @@ -1,6 +1,6 @@ #ifndef COMMAND_HPP #define COMMAND_HPP - +//test2 /* * command.h * @@ -10,17 +10,45 @@ * */ -/*This class is a parent to all the command classes. It has one pure int execute(). */ +/*This class is a parent to all the command classes. */ -using namespace std; -#include -#include +#include "mothur.h" +#include "optionparser.h" +#include "validparameter.h" +#include "mothurout.h" +#include "commandparameter.h" class Command { + public: + Command() { m = MothurOut::getInstance(); } + + //needed by gui + virtual string getCommandName() = 0; + virtual string getCommandCategory() = 0; + virtual string getHelpString() = 0; + virtual string getCitation() = 0; + virtual string getDescription() = 0; + + virtual map > getOutputFiles() { return outputTypes; } + virtual vector setParameters() = 0; //to fill parameters + virtual vector getParameters() { return parameters; } + virtual int execute() = 0; + virtual void help() = 0; + void citation() { m->mothurOutEndLine(); m->mothurOut(getCitation()); m->mothurOutEndLine(); } + virtual ~Command() { } + + protected: + MothurOut* m; + bool calledHelp; + + map > outputTypes; + vector parameters; + + map >::iterator itTypes; }; #endif