X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=commandfactory.hpp;h=eb85c68513bc43ece5cf9802917ebe336bc03d5a;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=a6dc5b72e0b403df37dd77b7ee593ca5ff19de73;hpb=8bc3e5b38c2317a1715f53be22fa96455868c281;p=mothur.git diff --git a/commandfactory.hpp b/commandfactory.hpp index a6dc5b7..eb85c68 100644 --- a/commandfactory.hpp +++ b/commandfactory.hpp @@ -12,6 +12,7 @@ #include "mothur.h" #include "mothurout.h" +#include "currentfile.h" class Command; @@ -25,24 +26,31 @@ public: bool isValidCommand(string); bool isValidCommand(string, string); void printCommands(ostream&); - void setOutputDirectory(string o) { outputDir = o; m->setOutputDir(o); } - void setInputDirectory(string i) { inputDir = i; } + void printCommandsCategories(ostream&); + void setOutputDirectory(string o) { if(m->dirCheck(o) || (o == "")) { outputDir = o; m->setOutputDir(o); } } + void setInputDirectory(string i) { if(m->dirCheck(i) || (i == "")) { inputDir = i; } } void setLogfileName(string n, bool a) { logFileName = n; append = a; } string getLogfileName() { return logFileName; } bool getAppend() { return append; } string getOutputDir() { return outputDir; } bool MPIEnabled(string); - + map getListCommands() { return commands; } + private: Command* command; Command* shellcommand; Command* pipecommand; + MothurOut* m; + CurrentFile* currentFile; + map commands; map::iterator it; string outputDir, inputDir, logFileName; bool append; + int checkForRedirects(string); + static CommandFactory* _uniqueInstance; CommandFactory( const CommandFactory& ); // Disable copy constructor void operator=( const CommandFactory& ); // Disable assignment operator