]> git.donarmstrong.com Git - mothur.git/blobdiff - command.hpp
added citation function to commands
[mothur.git] / command.hpp
index 2d1981aa4cca8d7e608e3708750fc079600d1265..6a1a4deea6c1df252a627fa827bb33a8f49b439c 100644 (file)
 #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<string> getValidParameters() = 0;
-               virtual vector<string> getRequiredParameters() = 0; //adding "or" as the last element indicates one of the previous is needed
-               virtual vector<string> getRequiredFiles() = 0; //adding "or" as the last element indicates one of the previous is needed
-               virtual map<string, vector<string> > 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<string, vector<string> > getOutputFiles() { return outputTypes; }
+               virtual vector<string> setParameters() = 0; //to fill parameters
+               virtual vector<CommandParameter> 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<string, vector<string> > outputTypes;
+               vector<CommandParameter> parameters;
        
                map<string, vector<string> >::iterator itTypes;
 };