fixed cli
This commit is contained in:
40
FlippR-Driver/include/EventHandler.h
Normal file
40
FlippR-Driver/include/EventHandler.h
Normal 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
|
||||
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user