Files
flippr-code/FlippR-Driver/src/input/InputDriver.h
2018-08-08 11:16:19 +02:00

39 lines
943 B
C++

/*
* 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(std::shared_ptr<IEventNotifier> event_notifier, std::unique_ptr<IDetector> detector, std::map<std::string, std::shared_ptr<Event>> events);
virtual void register_event_handler(IEventHandler* handler) override;
virtual void unregister_event_handler(IEventHandler* handler) override;
virtual std::shared_ptr<Event> get_event(std::string name);
private:
std::shared_ptr<IEventNotifier> event_notifier;
std::unique_ptr<IDetector> detector;
std::map<std::string, std::shared_ptr<Event>> events;
};
}
#endif /* SRC_INPUT_INPUTDRIVER_H_ */