X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;h=04285feff832088547c64a0f43da9c70dd7b1db5;hb=597560b3c23f03d0069082cf096ce65e0c087519;hp=b6bf5cd397644ad215a8a88f269f461d04add112;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;p=mothur.git diff --git a/command.hpp b/command.hpp index b6bf5cd..04285fe 100644 --- a/command.hpp +++ b/command.hpp @@ -17,16 +17,38 @@ #include "optionparser.h" #include "validparameter.h" #include "mothurout.h" +#include "commandparameter.h" + class Command { public: - Command() { m = MothurOut::getInstance(); } + 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