working on big refactor
This commit is contained in:
38
FlippR-Driver/src/input/impl/EventHandler.cpp
Normal file
38
FlippR-Driver/src/input/impl/EventHandler.cpp
Normal 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";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user