]> git.donarmstrong.com Git - mothur.git/blob - commandfactory.hpp
testing mpi
[mothur.git] / commandfactory.hpp
1 #ifndef COMMANDFACTORY_HPP
2 #define COMMANDFACTORY_HPP
3
4 /*
5  *  commandfactory.h
6  *  
7  *
8  *  Created by Pat Schloss on 10/25/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "mothurout.h";
15
16 class Command;
17
18 class CommandFactory {
19 public:
20         static CommandFactory* getInstance();
21         Command* getCommand(string, string);
22         Command* getCommand();
23         bool isValidCommand(string);
24         void printCommands(ostream&);
25         void setOutputDirectory(string o)       {       outputDir = o;          }
26         void setInputDirectory(string i)        {       inputDir = i;           }
27         string getOutputDir()                           {       return outputDir;       }
28         bool MPIEnabled(string);
29
30 private:
31         Command* command;
32         MothurOut* m;
33         map<string, string> commands;
34         map<string, string>::iterator it;
35         string outputDir, inputDir;
36         
37         static CommandFactory* _uniqueInstance;
38         CommandFactory( const CommandFactory& ); // Disable copy constructor
39         void operator=( const CommandFactory& ); // Disable assignment operator
40         CommandFactory();
41         ~CommandFactory();
42
43 };
44
45 #endif