8 * Created by Pat Schloss on 8/15/08.
9 * Copyright 2008 Patrick D. Schloss. All rights reserved.
16 #include "globaldata.hpp"
17 #include "commandoptionparser.hpp"
18 #include "command.hpp"
19 #include "commandfactory.hpp"
25 Engine() { cFactory = new CommandFactory(); }
26 virtual ~Engine(){ delete cFactory; }
27 virtual bool getInput() = 0;
28 // string getCommand() { return command; }
29 vector<string> getOptions() { return options; }
30 virtual void terminateCommand(int);
33 vector<string> options;
34 CommandFactory* cFactory;
39 class BatchEngine : public Engine {
41 BatchEngine(string, string);
43 virtual bool getInput();
46 GlobalData* globaldata;
47 ifstream inputBatchFile;
53 class InteractEngine : public Engine {
55 InteractEngine(string);
57 virtual bool getInput();
59 GlobalData* globaldata;
60 vector<string> previousInputs; //this is used to make the arrow keys work
65 class ScriptEngine : public Engine {
67 ScriptEngine(string, string);
69 virtual bool getInput();
72 GlobalData* globaldata;
73 string listOfCommands;
74 string getNextCommand(string&);