X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quitcommand.cpp;h=2c302e9e6b4f195c7d4acb1df97fd6110ea02ad5;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=0dd2dec189317e56518fbfafce1c93a3c7a84f1b;hpb=8bc3e5b38c2317a1715f53be22fa96455868c281;p=mothur.git diff --git a/quitcommand.cpp b/quitcommand.cpp index 0dd2dec..2c302e9 100644 --- a/quitcommand.cpp +++ b/quitcommand.cpp @@ -10,69 +10,19 @@ #include "quitcommand.h" //********************************************************************************************************************** -vector QuitCommand::getValidParameters(){ - try { - vector myArray; - return myArray; - } - catch(exception& e) { - m->errorOut(e, "QuitCommand", "getValidParameters"); - exit(1); - } -} -//********************************************************************************************************************** -vector QuitCommand::getRequiredParameters(){ - try { - vector myArray; - return myArray; - } - catch(exception& e) { - m->errorOut(e, "QuitCommand", "getRequiredParameters"); - exit(1); - } -} -//********************************************************************************************************************** -vector QuitCommand::getRequiredFiles(){ - try { - vector myArray; - return myArray; - } - catch(exception& e) { - m->errorOut(e, "QuitCommand", "getRequiredFiles"); - exit(1); - } -} -//********************************************************************************************************************** - QuitCommand::QuitCommand(string option) { - 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 if(option == "citation") { citation(); abort = true; calledHelp = true;} } //********************************************************************************************************************** - -void QuitCommand::help(){ - try { - m->mothurOut("The quit command will terminate mothur and should be in the following format: \n"); - m->mothurOut("quit() or quit\n\n"); - } - catch(exception& e) { - m->errorOut(e, "QuitCommand", "help"); - exit(1); - } -} - -//********************************************************************************************************************** - QuitCommand::~QuitCommand(){} - //********************************************************************************************************************** - int QuitCommand::execute(){ if (abort == true) { return 0; } return 1; } - //**********************************************************************************************************************