compilable version
This commit is contained in:
25
FlippR-Driver/src/input/ErrorEvent.hpp
Normal file
25
FlippR-Driver/src/input/ErrorEvent.hpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* ErrorEvent.h
|
||||
*
|
||||
* Created on: Aug 8, 2018
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_ERROREVENT_HPP_
|
||||
#define SRC_INPUT_ERROREVENT_HPP_
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
namespace Input
|
||||
{
|
||||
|
||||
class ErrorEvent : public Event
|
||||
{
|
||||
public:
|
||||
ErrorEvent() :
|
||||
Event(0, HIGHEST_INPUT_EVENT_PRIORITY, "ERROR")
|
||||
{}
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* SRC_INPUT_ERROREVENT_HPP_ */
|
||||
@@ -4,6 +4,7 @@
|
||||
* Created on: Jun 15, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
#include <input/ErrorEvent.hpp>
|
||||
#include "InputDriver.h"
|
||||
|
||||
namespace Input
|
||||
@@ -29,7 +30,7 @@ void InputDriver::unregister_event_handler(IEventHandler* handler)
|
||||
|
||||
std::shared_ptr<Event> InputDriver::get_event(std::string name)
|
||||
{
|
||||
std::shared_ptr<Event> event;
|
||||
std::shared_ptr<Event> event(new ErrorEvent());
|
||||
try
|
||||
{
|
||||
event = this->events.at(name);
|
||||
|
||||
Reference in New Issue
Block a user