]> git.donarmstrong.com Git - mothur.git/blobdiff - command.hpp
adding current file class
[mothur.git] / command.hpp
index e418de83e772dd824d83a6989ba51e1a92b60e06..2d1981aa4cca8d7e608e3708750fc079600d1265 100644 (file)
  *
  */
 
-/*This class is a parent to all the command classes.  It has one pure int execute(). */
+/*This class is a parent to all the command classes.  */
 
-using namespace std;
 
 #include "mothur.h"
+#include "optionparser.h"
+#include "validparameter.h"
+#include "mothurout.h"
+#include "currentfile.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
                virtual int execute() = 0;
+               virtual void help() = 0;
+               virtual ~Command() { }
+       protected:
+               MothurOut* m;
+               CurrentFile* currentFiles;
+               bool calledHelp;
+       
+               map<string, vector<string> >::iterator itTypes;
 };
 
 #endif