55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
/*
|
|
* InputDriver.hpp
|
|
*
|
|
* Created on: May 31, 2018
|
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
|
*/
|
|
#ifndef SRC_INPUT_INPUTDRIVER_HPP_
|
|
#define SRC_INPUT_INPUTDRIVER_HPP_
|
|
|
|
#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_HPP_ */
|