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 virtual string getCommand();
29 vector<string> getOptions() { return options; }
30 virtual void terminateCommand(int);
32 vector<string> options;
33 CommandFactory* cFactory;
38 class BatchEngine : public Engine {
40 BatchEngine(string, string);
42 virtual bool getInput();
45 GlobalData* globaldata;
46 ifstream inputBatchFile;
52 class InteractEngine : public Engine {
54 InteractEngine(string);
56 virtual bool getInput();
58 GlobalData* globaldata;
62 class ScriptEngine : public Engine {
64 ScriptEngine(string, string);
66 virtual bool getInput();
69 GlobalData* globaldata;
70 string listOfCommands;
71 string getNextCommand(string&);