changed to smart ptrs and trying to fix event_handler_tests

This commit is contained in:
Jonas Zeunert
2018-07-11 19:00:24 +02:00
parent 26c63d946d
commit 8b9ec68662
12 changed files with 47 additions and 61 deletions

View File

@@ -8,7 +8,7 @@
#ifndef INPUTFACTORY_H_
#define INPUTFACTORY_H_
#include <fstream>
#include <istream>
#include <atomic>
#include "Detector.h"
@@ -30,9 +30,9 @@ class InputDriverFactory
{
public:
static std::shared_ptr<InputDriver> get_InputDriver(std::string& input_config_path, std::string& matrix_config_path);
static std::shared_ptr<InputDriver> get_InputDriver(std::istream& input_config_stream, std::istream& matrix_config_stream);
private:
static Detector* get_detector(std::string& input_config_path, std::string& matrix_config_path);
static std::unique_ptr<IDetector> get_detector(std::istream& matrix_config_stream, std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::shared_ptr<IEventNotifier> event_notifier);
static std::map<char, Event> create_input_events(nlohmann::json matrix_config);
static void ConfigureLogger();
};