fixed cli

This commit is contained in:
Jonas Zeunert
2018-09-20 20:18:01 +02:00
parent 6daa369006
commit e450e9c664
5 changed files with 15 additions and 11 deletions

View File

@@ -0,0 +1,40 @@
/*
* InputEventHandler.h
*
* This interface must be implemented to be informed about input events.
*
* Please be aware that handle must be implemented thread safe!
*
* Created on: Apr 5, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#ifndef INPUTEVENTHANDLER_H_
#define INPUTEVENTHANDLER_H_
#include "IInputDriver.h"
#include "IEventHandler.h"
#include "Event.h"
namespace FlippR_Driver
{
namespace Input
{
class EventHandler;
class EventHandler : public IEventHandler
{
public:
EventHandler(std::shared_ptr<IInputDriver> input_driver);
virtual ~EventHandler();
virtual void handle(Event& event);
private:
std::shared_ptr<IInputDriver> input_driver;
};
}
}
#endif

View File

@@ -11,10 +11,11 @@
#include "IEventHandler.h"
#include <memory>
namespace FlippR_Driver {
namespace Input {
class IInputDriver {
namespace FlippR_Driver
{
namespace Input
{
class IInputDriver {
public:
virtual ~IInputDriver() {};
@@ -23,7 +24,7 @@ namespace FlippR_Driver {
virtual void unregister_event_handler(IEventHandler *handler) = 0;
virtual std::shared_ptr<Event> get_event(std::string name) = 0;
};
}
};
}
}
#endif /* SRC_INPUT_IINPUTDRIVER_H_ */