1 #ifndef COMMANDFACTORY_HPP
\r
2 #define COMMANDFACTORY_HPP
\r
8 * Created by Pat Schloss on 10/25/08.
\r
9 * Copyright 2008 Patrick D. Schloss. All rights reserved.
\r
14 #include "mothurout.h"
\r
18 class CommandFactory {
\r
20 static CommandFactory* getInstance();
\r
21 Command* getCommand(string, string, string);
\r
22 Command* getCommand(string, string);
\r
23 Command* getCommand(string);
\r
24 //Command* getCommand();
\r
25 bool isValidCommand(string);
\r
26 bool isValidCommand(string, string);
\r
27 void printCommands(ostream&);
\r
28 void setOutputDirectory(string o) { outputDir = o; m->setOutputDir(o); }
\r
29 void setInputDirectory(string i) { inputDir = i; }
\r
30 void setLogfileName(string n, bool a) { logFileName = n; append = a; }
\r
31 string getLogfileName() { return logFileName; }
\r
32 bool getAppend() { return append; }
\r
33 string getOutputDir() { return outputDir; }
\r
34 bool MPIEnabled(string);
\r
38 Command* shellcommand;
\r
39 Command* pipecommand;
\r
41 map<string, string> commands;
\r
42 map<string, string>::iterator it;
\r
43 string outputDir, inputDir, logFileName;
\r
46 static CommandFactory* _uniqueInstance;
\r
47 CommandFactory( const CommandFactory& ); // Disable copy constructor
\r
48 void operator=( const CommandFactory& ); // Disable assignment operator
\r