X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=commandfactory.cpp;h=0c1b3e075ee8ade15e0ea619463df962e9eac846;hb=09a01fb51eea9e81409d367410c831394193fd86;hp=49d197c40b9fe215f8067fa8d8a8f6ddb262f45c;hpb=67b6343929b6dbed97c4b26c3bb849725d573f6d;p=mothur.git diff --git a/commandfactory.cpp b/commandfactory.cpp index 49d197c..0c1b3e0 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -9,8 +9,9 @@ #include "command.hpp" #include "readdistcommand.h" +#include "readtreecommand.h" +#include "readsharedcommand.h" #include "readotucommand.h" -#include "readlistcommand.h" #include "clustercommand.h" #include "parselistcommand.h" #include "collectcommand.h" @@ -24,6 +25,9 @@ #include "helpcommand.h" #include "commandfactory.hpp" #include "deconvolutecommand.h" +#include "parsimonycommand.h" +#include "unifracunweightedcommand.h" +#include "unifracweightedcommand.h" #include @@ -49,21 +53,25 @@ Command* CommandFactory::getCommand(string commandName){ try { delete command; //delete the old command - if(commandName == "read.dist") { command = new ReadDistCommand(); } - else if(commandName == "read.otu") { command = new ReadOtuCommand(); } - else if(commandName == "read.list") { command = new ReadListFileCommand(); } - else if(commandName == "cluster") { command = new ClusterCommand(); } - else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); } - else if(commandName == "help") { command = new HelpCommand(); } - else if(commandName == "quit") { command = new QuitCommand(); } - else if(commandName == "collect.single") { command = new CollectCommand(); } - else if(commandName == "collect.shared") { command = new CollectSharedCommand(); } - else if(commandName == "rarefaction.single") { command = new RareFactCommand(); } - else if(commandName == "rarefaction.shared") { command = new RareFactSharedCommand(); } - else if(commandName == "summary.single") { command = new SummaryCommand(); } - else if(commandName == "summary.shared") { command = new SummarySharedCommand(); } - else { command = new NoCommand(); } - + if(commandName == "read.dist") { command = new ReadDistCommand(); } + else if(commandName == "read.otu") { command = new ReadOtuCommand(); } + else if(commandName == "read.tree") { command = new ReadTreeCommand(); } + else if(commandName == "read.shared") { command = new ReadSharedCommand(); } + else if(commandName == "cluster") { command = new ClusterCommand(); } + else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); } + else if(commandName == "parsimony") { command = new ParsimonyCommand(); } + else if(commandName == "help") { command = new HelpCommand(); } + else if(commandName == "quit") { command = new QuitCommand(); } + else if(commandName == "collect.single") { command = new CollectCommand(); } + else if(commandName == "collect.shared") { command = new CollectSharedCommand(); } + else if(commandName == "rarefaction.single") { command = new RareFactCommand(); } + else if(commandName == "rarefaction.shared") { command = new RareFactSharedCommand(); } + else if(commandName == "summary.single") { command = new SummaryCommand(); } + else if(commandName == "summary.shared") { command = new SummarySharedCommand(); } + else if(commandName == "unifrac.weighted") { command = new UnifracWeightedCommand(); } + else if(commandName == "unifrac.unweighted") { command = new UnifracUnweightedCommand(); } + else { command = new NoCommand(); } + return command; } catch(exception& e) { @@ -78,4 +86,3 @@ Command* CommandFactory::getCommand(string commandName){ } /***********************************************************/ -/***********************************************************/ \ No newline at end of file