summaryrefslogtreecommitdiff
path: root/project2/console/consoleAppEngine.h
blob: f4017e4519b2b06ea0a47ba880b336f125ce94d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef CONSOLEAPPENGINE_H
#define CONSOLEAPPENGINE_H

#include "task.h"
#include "presenter.h"
#include "commonObjects.h"
#include "view.h"
#include "execContext.h"
#include <vector>
#include <boost/tuple/tuple.hpp>

class ConsoleApplicationEngine : public ExecContext {
	public:
		ConsoleApplicationEngine();
		virtual ~ConsoleApplicationEngine();

		void process();
		VariableType getParameter(const VariableType&) const;
		SessionPtr getSession() const;

		static void appendScript(const char * arg);

		INITOPTIONS;

	private:
		void process(ScriptReaderPtr);

		typedef boost::tuple<Glib::ustring, Glib::ustring> ToDo;
		typedef std::vector<ToDo> ToDoList;
		typedef std::map<Glib::ustring, const Glib::ustring> ConsolePlatforms;
		typedef std::map<std::string, std::string> Parameters;

		mutable ConsolePlatforms conplat;
		SessionPtr runtime;
		MultiRowSetPresenterPtr presenter;

		static ToDoList todolist;
		static Parameters parameters;
	public:
		static Glib::ustring reqPlatform;
};

#endif