trennen
This commit is contained in:
54
FlippR-Driver/src/input/InputDriver.h
Normal file
54
FlippR-Driver/src/input/InputDriver.h
Normal 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_ */
|
||||
Reference in New Issue
Block a user