-
Notifications
You must be signed in to change notification settings - Fork 2
/
SAAPRunner.cpp
55 lines (49 loc) · 1.12 KB
/
SAAPRunner.cpp
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
45
46
47
48
49
50
51
52
53
54
55
/*
* SAAPRunner.cpp
*
* Created on: Aug 28, 2014
* Author: wilhelma
*/
#include <iostream>
#include "SAAPRunner.h"
#include "EventService.h"
#include "Interpreter.h"
#include "Filter.h"
#include "Event.h"
bool SAAPRunner::registerTool(Tool* tool,
const Filter* filter,
enum Events events)
{
EventService *service = _interpreter->getEventService();
service->subscribe(tool, filter, events);
return true;
}
bool SAAPRunner::removeTool(Tool* tool)
{
EventService *service = _interpreter->getEventService();
service->unsubscribe(tool);
return true;
}
void SAAPRunner::interpret()
{
_interpreter->process();
}
//class SAAPRunner {
//public:
// SAAPRunner(Interpreter* interpreter, EventService* eventservice) :
// _interpreter(interpreter), _eventService(eventservice) {}
// ~SAAPRunner() {}
//
// bool registerTool(Tool* tool);
// bool removeTool(Tool* tool);
// void interpret();
//
//private:
// // private data members
// Interpreter* _interpreter;
// EventService* _eventService;
//
// // prevent generated functions
// SAAPRunner(const SAAPRunner&);
// SAAPRunner& operator=(const SAAPRunner&);
//};