]> git.donarmstrong.com Git - mothur.git/blobdiff - commandfactory.cpp
fixed memory leak in parsimony calculator and added progress bars to parsimony and...
[mothur.git] / commandfactory.cpp
index 6e62995c32306cbcd0c9c9259ae0317a8ff706f9..354b5a3ba4de65d6576e408ff880930a11c0c1e0 100644 (file)
@@ -9,21 +9,32 @@
 
 #include "command.hpp"
 #include "readdistcommand.h"
+#include "readtreecommand.h"
 #include "readotucommand.h"
 #include "clustercommand.h"
 #include "parselistcommand.h"
 #include "collectcommand.h"
 #include "collectsharedcommand.h"
+#include "getgroupcommand.h"
+#include "getlabelcommand.h"
+#include "getlinecommand.h"
 #include "rarefactcommand.h"
 #include "summarycommand.h"
 #include "summarysharedcommand.h"
 #include "rarefactsharedcommand.h"
-#include "nocommand.h"
 #include "quitcommand.h"
 #include "helpcommand.h"
 #include "commandfactory.hpp"
 #include "deconvolutecommand.h"
-#include <exception>
+#include "parsimonycommand.h"
+#include "unifracunweightedcommand.h"
+#include "unifracweightedcommand.h"
+#include "libshuffcommand.h"
+#include "heatmapcommand.h"
+#include "venncommand.h"
+#include "mothur.h"
+#include "nocommands.h"
+#include "binsequencecommand.h"
 
 
 /***********************************************************/
@@ -32,7 +43,6 @@
 CommandFactory::CommandFactory(){
        command = new NoCommand();
 }
-
 /***********************************************************/
 
 /***********************************************************/
@@ -48,19 +58,30 @@ 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 == "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 == "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 if(commandName == "get.group")             {   command = new GetgroupCommand();                    }
+               else if(commandName == "get.label")             {   command = new GetlabelCommand();                    }
+               else if(commandName == "get.line")              {   command = new GetlineCommand();                             }
+               else if(commandName == "libshuff")              {   command = new LibShuffCommand();                    }
+               else if(commandName == "heatmap")                               {   command = new HeatMapCommand();                             }
+               else if(commandName == "venn")                                  {   command = new VennCommand();                                }
+               else if(commandName == "bin.seqs")                              {   command = new BinSeqCommand();                              }
+               else                                                                                    {       command = new NoCommand();                                      }
 
                return command;
        }
@@ -76,4 +97,3 @@ Command* CommandFactory::getCommand(string commandName){
 }
 /***********************************************************/
 
-/***********************************************************/
\ No newline at end of file