refactored displays
This commit is contained in:
@@ -21,7 +21,7 @@ class Display
|
||||
public:
|
||||
virtual ~Display() = default;
|
||||
|
||||
virtual void write_score(uint score) = 0;
|
||||
virtual void write_score(unsigned int score) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "output/items/Display.h"
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -19,7 +19,9 @@ namespace items
|
||||
class EightDigitDisplay : public Display
|
||||
{
|
||||
public:
|
||||
virtual void write_content(std::array<char , 8> content) = 0;
|
||||
virtual ~EightDigitDisplay() = default;
|
||||
|
||||
virtual void write_content(std::string content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#ifndef _SRC_OUTPUT_ILAMP_H_
|
||||
#define _SRC_OUTPUT_ILAMP_H_
|
||||
|
||||
#include "output/items/Item.h"
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
@@ -19,8 +18,7 @@ namespace items
|
||||
class Lamp
|
||||
{
|
||||
public:
|
||||
~Lamp()
|
||||
{};
|
||||
virtual ~Lamp() = default;
|
||||
|
||||
virtual void activate() = 0;
|
||||
virtual void deactivate() = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "Display.h"
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -19,7 +19,9 @@ namespace items
|
||||
class SevenDigitDisplay : public Display
|
||||
{
|
||||
public:
|
||||
virtual void write_content(std::array<char, 7> content) = 0;
|
||||
virtual ~SevenDigitDisplay() = default;
|
||||
|
||||
virtual void write_content(std::string content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#ifndef _SRC_OUTPUT_ISOLENOID_H_
|
||||
#define _SRC_OUTPUT_ISOLENOID_H_
|
||||
|
||||
#include "output/items/Item.h"
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -20,8 +19,7 @@ namespace items
|
||||
class Solenoid
|
||||
{
|
||||
public:
|
||||
~Solenoid()
|
||||
{};
|
||||
virtual ~Solenoid() = default;
|
||||
|
||||
virtual void trigger() = 0;
|
||||
};
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#ifndef _SRC_OUTPUT_ISOUND_H_
|
||||
#define _SRC_OUTPUT_ISOUND_H_
|
||||
|
||||
#include "output/items/Item.h"
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
@@ -20,8 +18,7 @@ namespace items
|
||||
class Sound
|
||||
{
|
||||
public:
|
||||
Sound();
|
||||
virtual ~Sound();
|
||||
virtual ~Sound() = default;
|
||||
|
||||
virtual void play() = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user