X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;h=6a1a4deea6c1df252a627fa827bb33a8f49b439c;hb=e150b0b0664caec517485ee6d69dcdade6dcae77;hp=2d1981aa4cca8d7e608e3708750fc079600d1265;hpb=f6c7165727bc17a5fbbcbb774d75ccffeb7f3da5;p=mothur.git diff --git a/command.hpp b/command.hpp index 2d1981a..6a1a4de 100644 --- a/command.hpp +++ b/command.hpp @@ -17,23 +17,35 @@ #include "optionparser.h" #include "validparameter.h" #include "mothurout.h" -#include "currentfile.h" +#include "commandparameter.h" + class Command { public: - Command() { m = MothurOut::getInstance(); currentFiles = CurrentFile::getInstance(); } - virtual vector getValidParameters() = 0; - virtual vector getRequiredParameters() = 0; //adding "or" as the last element indicates one of the previous is needed - virtual vector getRequiredFiles() = 0; //adding "or" as the last element indicates one of the previous is needed - virtual map > getOutputFiles() = 0; //file type to names + Command() { m = MothurOut::getInstance(); } + + //needed by gui + virtual string getCommandName() = 0; + virtual string getCommandCategory() = 0; + virtual string getHelpString() = 0; + virtual string getCitation() = 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->mothurOut(getCitation()); } virtual ~Command() { } + protected: MothurOut* m; - CurrentFile* currentFiles; bool calledHelp; + + map > outputTypes; + vector parameters; map >::iterator itTypes; };