34 lines
816 B
C++
34 lines
816 B
C++
/*
|
|
* InputFactory.h
|
|
*
|
|
* Created on: Apr 5, 2018
|
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
|
*/
|
|
|
|
#ifndef INPUTFACTORY_H_
|
|
#define INPUTFACTORY_H_
|
|
|
|
#include <istream>
|
|
#include <atomic>
|
|
|
|
#include "Detector.h"
|
|
#include "IInputDriver.h"
|
|
|
|
#include "utilities/InputGPIOInterface.h"
|
|
#include "json/json.hpp"
|
|
#include "IEventNotifier.h"
|
|
|
|
namespace FlippR_Driver::Input
|
|
{
|
|
class InputDriverFactory
|
|
{
|
|
|
|
public:
|
|
static std::shared_ptr<IInputDriver> get_InputDriver(std::istream& input_config_stream, std::istream& matrix_config_stream);
|
|
|
|
private:
|
|
static void create_input_events(nlohmann::json matrix_config, std::map<char, std::shared_ptr<Event>> address_event_map, std::map<std::string, std::shared_ptr<Event>> name_event_map);
|
|
};
|
|
}
|
|
#endif /* INPUTFACTORY_H_ */
|