refactoring to interfaces complete

This commit is contained in:
Jonas Zeunert
2018-06-14 21:37:54 +02:00
parent 13b5cc0b33
commit 692a2bd68f
11 changed files with 41 additions and 37 deletions

View File

@@ -6,21 +6,20 @@
*/
#ifndef SRC_INPUT_INPUTDRIVER_HPP_
#define SRC_INPUT_INPUTDRIVER_HPP_
#include "IInputDriver.h"
#include "../utilities/config.h"
#include "EventHandler.hpp"
#include "EventNotifier.h"
#include "Detector.h"
#include "IDetector.h"
namespace Input
{
class InputDriver
class InputDriver : public IInputDriver
{
public:
InputDriver(EventNotifier* event_notifier, Detector* detector) :
InputDriver(IEventNotifier* event_notifier, IDetector* detector) :
event_notifier(event_notifier), detector(detector)
{
CLOG(INFO, INPUT_LOGGER) << "Created InputDriver";
@@ -35,19 +34,19 @@ public:
detector = NULL;
}
void register_event_handler(EventHandler* handler)
void register_event_handler(IEventHandler* handler)
{
event_notifier->register_event_handler(handler);
}
void unregister_event_handler(EventHandler* handler)
void unregister_event_handler(IEventHandler* handler)
{
event_notifier->unregister_event_handler(handler);
}
private:
EventNotifier* event_notifier;
Detector* detector;
IDetector* detector;
};
}