X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;h=04285feff832088547c64a0f43da9c70dd7b1db5;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=ddb776356a183e0c310997ea7f9cb0acfc5e5c02;hpb=c69e2e9749626cfbf1d6cb0125ae94f869e00b18;p=mothur.git diff --git a/command.hpp b/command.hpp index ddb7763..04285fe 100644 --- a/command.hpp +++ b/command.hpp @@ -17,21 +17,38 @@ #include "optionparser.h" #include "validparameter.h" #include "mothurout.h" +#include "commandparameter.h" + class Command { public: - Command() { m = MothurOut::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 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