X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;fp=command.hpp;h=fd80ad1e9fc786fece31e00525476c453c6c2344;hb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;hp=93669ba7babe40f9b5889e953bf943d362cd7bbe;hpb=36a867cbd85d9c276d3c8d13f25a150bbbe2466b;p=mothur.git diff --git a/command.hpp b/command.hpp index 93669ba..fd80ad1 100644 --- a/command.hpp +++ b/command.hpp @@ -17,22 +17,33 @@ #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 + + //needed by gui + virtual string getCommandName() = 0; + virtual string getCommandCategory() = 0; + virtual string getHelpString() = 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; virtual ~Command() { } + protected: MothurOut* m; bool calledHelp; + + map > outputTypes; + vector parameters; map >::iterator itTypes; };