]> git.donarmstrong.com Git - mothur.git/blob - commandfactory.hpp
added set.dir command and modified commands to redirect input and output, removed...
[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
15 class Command;
16
17 class CommandFactory {
18 public:
19         static CommandFactory* getInstance();
20         Command* getCommand(string, string);
21         Command* getCommand();
22         bool isValidCommand(string);
23         void printCommands(ostream&);
24         void setOutputDirectory(string o)       {       outputDir = o;          }
25         void setInputDirectory(string i)        {       inputDir = i;           }
26         string getOutputDir()                           {       return outputDir;       }
27
28 private:
29         Command* command;
30         map<string, string> commands;
31         map<string, string>::iterator it;
32         string outputDir, inputDir;
33         
34         static CommandFactory* _uniqueInstance;
35         CommandFactory( const CommandFactory& ); // Disable copy constructor
36         void operator=( const CommandFactory& ); // Disable assignment operator
37         CommandFactory();
38         ~CommandFactory();
39
40 };
41
42 #endif