working on big refactor

This commit is contained in:
Jonas Zeunert
2018-12-14 01:09:54 +01:00
parent f3100004b9
commit 2aee0f4f9d
67 changed files with 914 additions and 619 deletions

View File

@@ -0,0 +1,38 @@
/*
* EventHandler.cpp
*
* Created on: Jun 14, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
*/
#include "EventHandler.h"
#include "utility/config.h"
namespace flippR_driver
{
namespace input
{
namespace impl
{
EventHandler::EventHandler(std::shared_ptr<InputDriver> input_driver) :
input_driver(std::move(input_driver))
{
this->input_driver->register_event_handler(this);
CLOG(INFO, INPUT_LOGGER) << "Created EventHandler";
}
EventHandler::~EventHandler()
{
this->input_driver->unregister_event_handler(this);
}
// This function is intended to be non pure, if it is called when the derived class doesn't exist anymore
void EventHandler::handle(Event &event)
{
CLOG(WARNING, INPUT_LOGGER) << "Called EventHandler parent class";
}
}
}
}