36 lines
771 B
C++
36 lines
771 B
C++
/*
|
|
* EventHandler.cpp
|
|
*
|
|
* Created on: Jun 14, 2018
|
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
|
|
*/
|
|
#include "input/EventHandler.h"
|
|
#include "utility/config.h"
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace input
|
|
{
|
|
|
|
EventHandler::EventHandler(std::shared_ptr<IInputDriver> 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";
|
|
}
|
|
|
|
}
|
|
}
|