]> git.donarmstrong.com Git - mothur.git/blobdiff - command.hpp
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / command.hpp
index 93669ba7babe40f9b5889e953bf943d362cd7bbe..fd80ad1e9fc786fece31e00525476c453c6c2344 100644 (file)
 #include "optionparser.h"
 #include "validparameter.h"
 #include "mothurout.h"
+#include "commandparameter.h"
 
 
 class Command {
        
        public:
                Command() {  m = MothurOut::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
+               
+               //needed by gui
+               virtual string getCommandName() = 0;
+               virtual string getCommandCategory() = 0;
+               virtual string getHelpString() = 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;
                virtual ~Command() { }
+       
        protected:
                MothurOut* m;
                bool calledHelp;
+                       
+               map<string, vector<string> > outputTypes;
+               vector<CommandParameter> parameters;
        
                map<string, vector<string> >::iterator itTypes;
 };