refactoring to interfaces
This commit is contained in:
30
FlippR-Driver/src/input/IDetector.h
Normal file
30
FlippR-Driver/src/input/IDetector.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* IDetector.h
|
||||
*
|
||||
* Created on: Jun 13, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_IDETECTOR_H_
|
||||
#define SRC_INPUT_IDETECTOR_H_
|
||||
|
||||
#include <thread>
|
||||
#include <map>
|
||||
|
||||
#include "../utilities/InputGPIOInterface.h"
|
||||
#include "Event.hpp"
|
||||
#include "EventNotifier.h"
|
||||
|
||||
namespace Input
|
||||
{
|
||||
|
||||
class IDetector
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~IDetector() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SRC_INPUT_IDETECTOR_H_ */
|
||||
19
FlippR-Driver/src/input/IEventHandler.h
Normal file
19
FlippR-Driver/src/input/IEventHandler.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* IEventHandler.h
|
||||
*
|
||||
* Created on: Jun 13, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_IEVENTHANDLER_H_
|
||||
#define SRC_INPUT_IEVENTHANDLER_H_
|
||||
|
||||
namespace Input {
|
||||
|
||||
class IEventHandler
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
#endif /* SRC_INPUT_IEVENTHANDLER_H_ */
|
||||
29
FlippR-Driver/src/input/IEventNotifier.h
Normal file
29
FlippR-Driver/src/input/IEventNotifier.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* IEventNotifier.h
|
||||
*
|
||||
* Created on: Jun 13, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_IEVENTNOTIFIER_H_
|
||||
#define SRC_INPUT_IEVENTNOTIFIER_H_
|
||||
|
||||
#include "IEventHandler.h"
|
||||
#include "Event.hpp"
|
||||
|
||||
namespace Input
|
||||
{
|
||||
|
||||
class IEventNotifier
|
||||
{
|
||||
public:
|
||||
virtual ~IEventNotifier() = 0;
|
||||
|
||||
virtual void register_event_handler(IEventHandler* handler) = 0;
|
||||
virtual void unregister_event_handler(IEventHandler* handler) = 0;
|
||||
|
||||
virtual void distribute_event(Event& event) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
#endif /* SRC_INPUT_IEVENTNOTIFIER_H_ */
|
||||
0
FlippR-Driver/src/input/IInputDriver
Normal file
0
FlippR-Driver/src/input/IInputDriver
Normal file
20
FlippR-Driver/src/input/IInputDriver.h
Normal file
20
FlippR-Driver/src/input/IInputDriver.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* IInputDriver.h
|
||||
*
|
||||
* Created on: Jun 14, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_IINPUTDRIVER_H_
|
||||
#define SRC_INPUT_IINPUTDRIVER_H_
|
||||
|
||||
|
||||
namespace Input {
|
||||
|
||||
class IInputDriver
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* SRC_INPUT_IINPUTDRIVER_H_ */
|
||||
19
FlippR-Driver/src/input/IInputDriverFactory.h
Normal file
19
FlippR-Driver/src/input/IInputDriverFactory.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* IInputDriverFactory.h
|
||||
*
|
||||
* Created on: Jun 13, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
|
||||
#ifndef SRC_INPUT_IINPUTDRIVERFACTORY_H_
|
||||
#define SRC_INPUT_IINPUTDRIVERFACTORY_H_
|
||||
|
||||
namespace Input {
|
||||
|
||||
class IInputDriverFactory
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* SRC_INPUT_IINPUTDRIVERFACTORY_H_ */
|
||||
Reference in New Issue
Block a user