Files
flippr-code/FlippR-Driver/src/input/InputDriverFactory.h
2018-06-15 00:16:29 +02:00

39 lines
899 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 <fstream>
#include "IDetector.h"
#include "../utilities/InputGPIOInterface.h"
#include "../utilities/config.h"
#include "../lib/json/json.hpp"
#include "../lib/easylogging/easylogging++.h"
#include "IEventNotifier.h"
using namespace nlohmann;
INITIALIZE_EASYLOGGINGPP
namespace Input
{
class InputFactory
{
public:
static shared_ptr<IInputDriver*> get_InputDriver(std::string& input_config_path, std::string& matrix_config_path);
private:
static IDetector* get_detector(std::string& input_config_path, std::string& matrix_config_path);
static std::map<char, Event> create_input_events(json matrix_config);
static void ConfigureLogger();
#endif /* INPUTFACTORY_H_ */