]> git.donarmstrong.com Git - mothur.git/blobdiff - command.hpp
classify.seqs allows sequences to be in taxonomy file that are not in template. ...
[mothur.git] / command.hpp
index ddb776356a183e0c310997ea7f9cb0acfc5e5c02..f5e09042234f1c39ac8010f859e6f69708871dc3 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef COMMAND_HPP
 #define COMMAND_HPP
-
+//test2
 /*
  *  command.h
  *  
 #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
+               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<string, vector<string> > getOutputFiles() { return outputTypes; }
+        virtual string getOutputFileNameTag(string, string) = 0;  //we may not know the complete filename, because some commands use info from the file to create the output file name (ie label). but we do the ending tag which should be enough to find the output file name from a list. Allows for optional passing of the inputFileName for the commands that require its extension.
+               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->mothurOutEndLine(); m->mothurOut(getCitation()); m->mothurOutEndLine(); }
                virtual ~Command() { }
+       
        protected:
                MothurOut* m;
                bool calledHelp;
+                       
+               map<string, vector<string> > outputTypes;
+               vector<CommandParameter> parameters;
+       
+               map<string, vector<string> >::iterator itTypes;
 };
 
 #endif