This commit is contained in:
Jonas Zeunert
2018-06-15 00:02:03 +02:00
parent ec41e9e314
commit d027d32e2f
19 changed files with 79 additions and 20 deletions

View File

@@ -0,0 +1,54 @@
/*
* InputDriver.hpp
*
* Created on: May 31, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#ifndef SRC_INPUT_INPUTDRIVER_H_
#define SRC_INPUT_INPUTDRIVER_H_
#include "../utilities/config.h"
#include "IInputDriver.h"
#include "IDetector.h"
namespace Input
{
class InputDriver : public IInputDriver
{
public:
InputDriver(IEventNotifier* event_notifier, IDetector* detector) :
event_notifier(event_notifier), detector(detector)
{
CLOG(INFO, INPUT_LOGGER) << "Created InputDriver";
}
~InputDriver()
{
delete event_notifier;
event_notifier = NULL;
delete detector;
detector = NULL;
}
void register_event_handler(IEventHandler* handler)
{
event_notifier->register_event_handler(handler);
}
void unregister_event_handler(IEventHandler* handler)
{
event_notifier->unregister_event_handler(handler);
}
private:
IEventNotifier* event_notifier;
IDetector* detector;
};
}
#endif /* SRC_INPUT_INPUTDRIVER_H_ */