changed everything to impl

This commit is contained in:
Jonas Zeunert
2018-12-14 03:14:50 +01:00
parent ff3376b9d7
commit 2b9981e521
40 changed files with 271 additions and 236 deletions

View File

@@ -8,10 +8,10 @@
#ifndef _SRC_OUTPUT_IOUTPUTDRIVER_H_
#define _SRC_OUTPUT_IOUTPUTDRIVER_H_
#include "output/items/ILamp.h"
#include "output/items/ISolenoid.h"
#include "output/items/IDisplay.h"
#include "output/items/ISound.h"
#include "output/items/impl/Lamp.h"
#include "output/items/Solenoid.h"
#include "output/items/Display.h"
#include "output/items/Sound.h"
#include <vector>
#include <memory>
@@ -27,15 +27,15 @@ class OutputDriver
public:
virtual ~OutputDriver() = default;
virtual std::vector<std::shared_ptr<items::ILamp>> get_lamps() = 0;
virtual std::vector<std::shared_ptr<items::ISolenoid>> get_solenoids() = 0;
virtual std::vector<std::shared_ptr<items::ISound>> get_sounds() = 0;
virtual std::vector<std::shared_ptr<items::IDisplay>> get_displays() = 0;
virtual std::vector<std::shared_ptr<items::Lamp>> get_lamps() = 0;
virtual std::vector<std::shared_ptr<items::Solenoid>> get_solenoids() = 0;
virtual std::vector<std::shared_ptr<items::Sound>> get_sounds() = 0;
virtual std::vector<std::shared_ptr<items::Display>> get_displays() = 0;
virtual boost::optional<std::shared_ptr<items::ILamp>> get_lamp(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::ISolenoid>> get_solenoid(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::ISound>> get_sound(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::IDisplay>> get_display(char number) = 0;
virtual boost::optional<std::shared_ptr<items::Lamp>> get_lamp(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::Solenoid>> get_solenoid(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::Sound>> get_sound(std::string name) = 0;
virtual boost::optional<std::shared_ptr<items::Display>> get_display(char number) = 0;
};
} /* namespace output */

View File

@@ -5,7 +5,7 @@
#ifndef FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
#define FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
#include "IOutputDisplay.h"
#include "OutputDisplay.h"
#include <array>

View File

@@ -1,5 +1,5 @@
/*
* ILamp.h
* Lamp.h
*
* Created on: Aug 7, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
@@ -8,7 +8,7 @@
#ifndef _SRC_OUTPUT_ILAMP_H_
#define _SRC_OUTPUT_ILAMP_H_
#include "output/items/IItem.h"
#include "output/items/Item.h"
namespace flippR_driver
{
namespace output
@@ -16,10 +16,10 @@ namespace output
namespace items
{
class ILamp
class Lamp
{
public:
~ILamp()
~Lamp()
{};
virtual void activate() = 0;

View File

@@ -5,7 +5,7 @@
#ifndef FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
#define FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
#include "IOutputDisplay.h"
#include "OutputDisplay.h"
#include <array>

View File

@@ -1,5 +1,5 @@
/*
* ISolenoid.h
* Solenoid.h
*
* Created on: Aug 7, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
@@ -8,7 +8,7 @@
#ifndef _SRC_OUTPUT_ISOLENOID_H_
#define _SRC_OUTPUT_ISOLENOID_H_
#include "output/items/IItem.h"
#include "output/items/Item.h"
namespace flippR_driver
{
@@ -17,10 +17,10 @@ namespace output
namespace items
{
class ISolenoid
class Solenoid
{
public:
~ISolenoid()
~Solenoid()
{};
virtual void trigger() = 0;

View File

@@ -1,5 +1,5 @@
/*
* ISound.h
* Sound.h
*
* Created on: Aug 2, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
@@ -8,7 +8,7 @@
#ifndef _SRC_OUTPUT_ISOUND_H_
#define _SRC_OUTPUT_ISOUND_H_
#include "output/items/IItem.h"
#include "output/items/Item.h"
namespace flippR_driver
{
@@ -17,11 +17,11 @@ namespace output
namespace items
{
class ISound
class Sound
{
public:
ISound();
virtual ~ISound();
Sound();
virtual ~Sound();
virtual void play() = 0;
};