refactoring to h and cpp

This commit is contained in:
Jonas Zeunert
2018-06-15 00:16:29 +02:00
parent d027d32e2f
commit bacf59ba71
9 changed files with 156 additions and 134 deletions

View File

@@ -4,7 +4,28 @@
* Created on: Jun 14, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#include "EventHandler.h"
using namespace Input;
EventHandler::EventHandler(std::shared_ptr<IInputDriver> input_driver) :
input_driver(input_driver)
{
this->input_driver->register_event_handler(this);
CLOG(INFO, INPUT_LOGGER) << "Created EventHandler";
}
virtual EventHandler::~EventHandler()
{
this->input_driver->unregister_event_handler(this);
this->input_driver = NULL;
}
// This function is intended to be non pure, if it is called when the derived class doesn't exist anymore
virtual void EventHandler::handle(Event& event)
{
CLOG(WARNING, INPUT_LOGGER) << "Called EventHandler parent class";
}