refactored namespaces
This commit is contained in:
@@ -12,7 +12,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class Event
|
class Event
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
#include "IEventHandler.h"
|
#include "IEventHandler.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace FlippR_Driver::Input {
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input {
|
||||||
|
|
||||||
class IInputDriver
|
class IInputDriver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
#include "utilities/config.h"
|
#include "utilities/config.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, std::shared_ptr<Event>> events, std::shared_ptr<IEventNotifier> event_notifier) :
|
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, std::shared_ptr<Event>> events, std::shared_ptr<IEventNotifier> event_notifier) :
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
#include "IEventNotifier.h"
|
#include "IEventNotifier.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class Detector : public IDetector
|
class Detector : public IDetector
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class ErrorEvent : public Event
|
class ErrorEvent : public Event
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
#include "utilities/config.h"
|
#include "utilities/config.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
Event::Event(char address, int priority, std::string name) :
|
Event::Event(char address, int priority, std::string name) :
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
#include "EventHandler.h"
|
#include "EventHandler.h"
|
||||||
#include "utilities/config.h"
|
#include "utilities/config.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
EventHandler::EventHandler(std::shared_ptr<IInputDriver> input_driver) :
|
EventHandler::EventHandler(std::shared_ptr<IInputDriver> input_driver) :
|
||||||
|
|||||||
@@ -17,7 +17,9 @@
|
|||||||
#include "IEventHandler.h"
|
#include "IEventHandler.h"
|
||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
class EventHandler;
|
class EventHandler;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
#include "EventNotifier.h"
|
#include "EventNotifier.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
EventNotifier::EventNotifier(IBlockingQueue<Event>* queue) :
|
EventNotifier::EventNotifier(IBlockingQueue<Event>* queue) :
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
#define HANDLER_TIMEOUT 2000
|
#define HANDLER_TIMEOUT 2000
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class EventNotifier : public IEventNotifier
|
class EventNotifier : public IEventNotifier
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
#define SRC_INPUT_IDETECTOR_H_
|
#define SRC_INPUT_IDETECTOR_H_
|
||||||
|
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class IDetector
|
class IDetector
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
#include "IEventHandler.h"
|
#include "IEventHandler.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class IEventNotifier
|
class IEventNotifier
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
#include <input/ErrorEvent.hpp>
|
#include <input/ErrorEvent.hpp>
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
InputDriver::InputDriver(std::shared_ptr<IEventNotifier> event_notifier, std::unique_ptr<IDetector> detector, std::map<std::string, std::shared_ptr<Event>> events) :
|
InputDriver::InputDriver(std::shared_ptr<IEventNotifier> event_notifier, std::unique_ptr<IDetector> detector, std::map<std::string, std::shared_ptr<Event>> events) :
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
#include "IInputDriver.h"
|
#include "IInputDriver.h"
|
||||||
#include "IDetector.h"
|
#include "IDetector.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
class InputDriver : public IInputDriver
|
class InputDriver : public IInputDriver
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
|
|
||||||
|
|
||||||
namespace FlippR_Driver::Input {
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input {
|
||||||
|
|
||||||
std::shared_ptr<IInputDriver>
|
std::shared_ptr<IInputDriver>
|
||||||
InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream) {
|
InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream) {
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
#include "json/json.hpp"
|
#include "json/json.hpp"
|
||||||
#include "IEventNotifier.h"
|
#include "IEventNotifier.h"
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
class InputDriverFactory
|
class InputDriverFactory
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace fakeit;
|
using namespace fakeit;
|
||||||
using namespace FlippR_Driver::Input;
|
using namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input;
|
||||||
|
|
||||||
|
|
||||||
SCENARIO("Creating a Detector object", "")
|
SCENARIO("Creating a Detector object", "")
|
||||||
|
|||||||
@@ -20,7 +20,9 @@
|
|||||||
|
|
||||||
#include "input/EventNotifier.h"
|
#include "input/EventNotifier.h"
|
||||||
|
|
||||||
using namespace FlippR_Driver::Input;
|
using namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input;
|
||||||
using namespace fakeit;
|
using namespace fakeit;
|
||||||
|
|
||||||
SCENARIO("An EventNotifier gets created", "[construction]")
|
SCENARIO("An EventNotifier gets created", "[construction]")
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace fakeit;
|
using namespace fakeit;
|
||||||
using namespace FlippR_Driver::Input;
|
using namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input;
|
||||||
|
|
||||||
SCENARIO("An InputDriver gets created", "[construction}")
|
SCENARIO("An InputDriver gets created", "[construction}")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
|
|
||||||
#include "input/EventNotifier.h"
|
#include "input/EventNotifier.h"
|
||||||
|
|
||||||
using namespace FlippR_Driver::Input;
|
using namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input;
|
||||||
using namespace fakeit;
|
using namespace fakeit;
|
||||||
|
|
||||||
SCENARIO("The factory creates a InputDriver")
|
SCENARIO("The factory creates a InputDriver")
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
#ifndef SRC_TESTS_INPUT_MOCKS_EVENTHANDLERMOCK_HPP_
|
#ifndef SRC_TESTS_INPUT_MOCKS_EVENTHANDLERMOCK_HPP_
|
||||||
#define SRC_TESTS_INPUT_MOCKS_EVENTHANDLERMOCK_HPP_
|
#define SRC_TESTS_INPUT_MOCKS_EVENTHANDLERMOCK_HPP_
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
class EventHandler;
|
class EventHandler;
|
||||||
class Event;
|
class Event;
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
#ifndef SRC_TESTS_INPUT_MOCKS_EVENTNOTIFIERMOCK_HPP_
|
#ifndef SRC_TESTS_INPUT_MOCKS_EVENTNOTIFIERMOCK_HPP_
|
||||||
#define SRC_TESTS_INPUT_MOCKS_EVENTNOTIFIERMOCK_HPP_
|
#define SRC_TESTS_INPUT_MOCKS_EVENTNOTIFIERMOCK_HPP_
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
class EventNotifier;
|
class EventNotifier;
|
||||||
class EventHandler;
|
class EventHandler;
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
#ifndef SRC_TESTS_INPUT_MOCKS_INPUTDRIVERMOCK_HPP_
|
#ifndef SRC_TESTS_INPUT_MOCKS_INPUTDRIVERMOCK_HPP_
|
||||||
#define SRC_TESTS_INPUT_MOCKS_INPUTDRIVERMOCK_HPP_
|
#define SRC_TESTS_INPUT_MOCKS_INPUTDRIVERMOCK_HPP_
|
||||||
|
|
||||||
namespace FlippR_Driver::Input
|
namespace FlippR_Driver
|
||||||
|
{
|
||||||
|
namespace Input
|
||||||
{
|
{
|
||||||
class InputDriver;
|
class InputDriver;
|
||||||
class EventHandler;
|
class EventHandler;
|
||||||
|
|||||||
Reference in New Issue
Block a user