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