]> git.donarmstrong.com Git - mothur.git/blobdiff - setdircommand.cpp
*** empty log message ***
[mothur.git] / setdircommand.cpp
index a9ae730fba554945fb737c08b0f4cc739af5bec8..a76db24282e2c00032ec747de2d1d5decf20e095 100644 (file)
@@ -9,14 +9,48 @@
 
 #include "setdircommand.h"
 
+//**********************************************************************************************************************
+vector<string> SetDirectoryCommand::getValidParameters(){      
+       try {
+               string Array[] =  {"output","input","tempdefault","outputdir","inputdir"};
+               vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "SetDirectoryCommand", "getValidParameters");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+vector<string> SetDirectoryCommand::getRequiredParameters(){   
+       try {
+               vector<string> myArray;
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "SetDirectoryCommand", "getRequiredParameters");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+vector<string> SetDirectoryCommand::getRequiredFiles(){        
+       try {
+               vector<string> myArray;
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "SetDirectoryCommand", "getRequiredFiles");
+               exit(1);
+       }
+}
 //**********************************************************************************************************************
 
 SetDirectoryCommand::SetDirectoryCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -83,7 +117,7 @@ SetDirectoryCommand::~SetDirectoryCommand(){}
 int SetDirectoryCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                commandFactory = CommandFactory::getInstance();