X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=commandfactory.cpp;h=b61c2d2dc820c7cf05b7f82d3983017f2d6d4c55;hb=8da8321bc4d705f6c156248d6229c60a0204f750;hp=bdcfbbab528a785abce1330a3bb6b19d8212fdd6;hpb=597560b3c23f03d0069082cf096ce65e0c087519;p=mothur.git diff --git a/commandfactory.cpp b/commandfactory.cpp index bdcfbba..b61c2d2 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -130,6 +130,8 @@ #include "sortseqscommand.h" #include "classifytreecommand.h" #include "cooccurrencecommand.h" +#include "pcrseqscommand.h" +#include "createdatabasecommand.h" /*******************************************************/ @@ -281,6 +283,8 @@ CommandFactory::CommandFactory(){ commands["sort.seqs"] = "sort.seqs"; commands["classify.tree"] = "classify.tree"; commands["cooccurrence"] = "cooccurrence"; + commands["pcr.seqs"] = "pcr.seqs"; + commands["create.database"] = "create.database"; commands["quit"] = "MPIEnabled"; } @@ -311,6 +315,7 @@ CommandFactory::~CommandFactory(){ //This function calls the appropriate command fucntions based on user input. Command* CommandFactory::getCommand(string commandName, string optionString){ try { + delete command; //delete the old command //user has opted to redirect output from dir where input files are located to some other place @@ -445,6 +450,8 @@ Command* CommandFactory::getCommand(string commandName, string optionString){ else if(commandName == "sort.seqs") { command = new SortSeqsCommand(optionString); } else if(commandName == "classify.tree") { command = new ClassifyTreeCommand(optionString); } else if(commandName == "cooccurrence") { command = new CooccurrenceCommand(optionString); } + else if(commandName == "pcr.seqs") { command = new PcrSeqsCommand(optionString); } + else if(commandName == "create.database") { command = new CreateDatabaseCommand(optionString); } else { command = new NoCommand(optionString); } return command; @@ -593,6 +600,8 @@ Command* CommandFactory::getCommand(string commandName, string optionString, str else if(commandName == "sort.seqs") { pipecommand = new SortSeqsCommand(optionString); } else if(commandName == "classify.tree") { pipecommand = new ClassifyTreeCommand(optionString); } else if(commandName == "cooccurrence") { pipecommand = new CooccurrenceCommand(optionString); } + else if(commandName == "pcr.seqs") { pipecommand = new PcrSeqsCommand(optionString); } + else if(commandName == "create.database") { pipecommand = new CreateDatabaseCommand(optionString); } else { pipecommand = new NoCommand(optionString); } return pipecommand; @@ -729,6 +738,8 @@ Command* CommandFactory::getCommand(string commandName){ else if(commandName == "sort.seqs") { shellcommand = new SortSeqsCommand(); } else if(commandName == "classify.tree") { shellcommand = new ClassifyTreeCommand(); } else if(commandName == "cooccurrence") { shellcommand = new CooccurrenceCommand(); } + else if(commandName == "pcr.seqs") { shellcommand = new PcrSeqsCommand(); } + else if(commandName == "create.database") { shellcommand = new CreateDatabaseCommand(); } else { shellcommand = new NoCommand(); } return shellcommand;