X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=setlogfilecommand.cpp;h=128c5671ed55712d2293e0b3c3959da17a7e9f05;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=00e702c7b86d3d7bd16dfa5a162250f49402dae1;hpb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;p=mothur.git diff --git a/setlogfilecommand.cpp b/setlogfilecommand.cpp index 00e702c..128c567 100644 --- a/setlogfilecommand.cpp +++ b/setlogfilecommand.cpp @@ -13,10 +13,10 @@ //********************************************************************************************************************** vector SetLogFileCommand::setParameters(){ try { - CommandParameter pappend("append", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(pappend); - CommandParameter pname("name", "String", "", "", "", "", "",false,true); parameters.push_back(pname); - CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); - CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir); + CommandParameter pappend("append", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pappend); + CommandParameter pname("name", "String", "", "", "", "", "","",false,true,true); parameters.push_back(pname); + CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir); + CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir); vector myArray; for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); } @@ -35,7 +35,7 @@ string SetLogFileCommand::getHelpString(){ helpString += "The set.logfile command parameters are name and append, name is required. Append is set to false by default.\n"; helpString += "The set.logfile command should be in the following format: set.logfile(name=yourLogFileName, append=T).\n"; helpString += "Example set.logfile(name=/Users/lab/desktop/output.txt, append=T).\n"; - helpString += "Note: No spaces between parameter labels (i.e. name), '=' and parameters (i.e.yourLogFileName).\n\n"; + helpString += "Note: No spaces between parameter labels (i.e. name), '=' and parameters (i.e.yourLogFileName).\n"; return helpString; } catch(exception& e) { @@ -51,11 +51,10 @@ SetLogFileCommand::SetLogFileCommand(string option) { //allow user to run help if(option == "help") { help(); abort = true; calledHelp = true; } + else if(option == "citation") { citation(); abort = true; calledHelp = true;} else { - //valid paramters for this command - string Array[] = {"name","append","outputdir","inputdir"}; - vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + vector myArray = setParameters(); OptionParser parser(option); map parameters = parser.getParameters();