]> git.donarmstrong.com Git - mothur.git/blob - commandfactory.hpp
created mothurOut class to handle logfiles
[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
29 private:
30         Command* command;
31         MothurOut* m;
32         map<string, string> commands;
33         map<string, string>::iterator it;
34         string outputDir, inputDir;
35         
36         static CommandFactory* _uniqueInstance;
37         CommandFactory( const CommandFactory& ); // Disable copy constructor
38         void operator=( const CommandFactory& ); // Disable assignment operator
39         CommandFactory();
40         ~CommandFactory();
41
42 };
43
44 #endif