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