]> git.donarmstrong.com Git - mothur.git/blob - engine.hpp
removing chime source files from mother project.
[mothur.git] / engine.hpp
1 #ifndef ENGINE_HPP
2 #define ENGINE_HPP
3
4 /*
5  *  engine.hpp
6  *  
7  *
8  *  Created by Pat Schloss on 8/15/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  */
12  
13
14
15 #include "mothur.h"
16 #include "commandoptionparser.hpp"
17 #include "command.hpp"
18 #include "commandfactory.hpp"
19 #include "mothurout.h"
20
21 class Engine {
22 public:
23         Engine(); 
24         virtual ~Engine(){}
25         virtual bool getInput() = 0;
26         virtual string getCommand();
27         virtual string getOutputDir()                   {       return cFactory->getOutputDir();        }
28         virtual string getLogFileName()                 {       return cFactory->getLogfileName();      }
29         virtual bool getAppend()                                {       return cFactory->getAppend();           }
30
31         vector<string> getOptions()             {       return options;         }
32 protected:
33         vector<string> options;
34         CommandFactory* cFactory;
35         MothurOut* mout;
36         string findMothursPath();
37 };
38
39
40
41 class BatchEngine : public Engine {
42 public:
43         BatchEngine(string, string);
44         ~BatchEngine();
45         virtual bool getInput();
46         int openedBatch;
47 private:
48         ifstream inputBatchFile;
49         string getNextCommand(ifstream&);
50
51 };
52
53
54
55 class InteractEngine : public Engine {
56 public:
57         InteractEngine(string);
58         ~InteractEngine();
59         virtual bool getInput();
60 private:
61         
62 };
63
64
65 class ScriptEngine : public Engine {
66 public:
67         ScriptEngine(string, string);
68         ~ScriptEngine();
69         virtual bool getInput();
70         int openedBatch;
71 private:
72         string listOfCommands;
73         string getNextCommand(string&);
74
75 };
76
77
78 #endif