refactored InputName

This commit is contained in:
Jonas Zeunert
2018-05-31 17:42:43 +02:00
parent 2321f2997f
commit 01b0d990f3
8 changed files with 60 additions and 55 deletions

View File

@@ -12,24 +12,24 @@
#ifndef INPUTEVENTHANDLER_H_
#define INPUTEVENTHANDLER_H_
#include "Detector.h"
#include "InputDriver.h"
#include "Event.hpp"
namespace Input
{
class InputEventHandler
class EventHandler
{
public:
InputEventHandler(std::shared_ptr<Detector> detector) :
EventHandler(std::shared_ptr<Detector> detector) :
detector(detector)
{
this->detector->register_input_event_handler(this);
this->detector->register_event_handler(this);
}
virtual ~InputEventHandler()
{
this->detector->unregister_input_event_handler(this);
this->detector->unregister_event_handler(this);
this->detector = NULL;
}