some refactoring
This commit is contained in:
24
FlippR-Driver/include/output/IEightDigitDisplay.h
Normal file
24
FlippR-Driver/include/output/IEightDigitDisplay.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Created by rhetenor on 20.11.18.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||
#define FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace flippr_driver
|
||||
{
|
||||
namespace output
|
||||
{
|
||||
|
||||
class IEightDigitDisplay
|
||||
{
|
||||
public:
|
||||
virtual void write_score(int score);
|
||||
virtual void write_content(std::array<char, 8> content);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif //FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||
31
FlippR-Driver/include/output/IOutputDisplay.h
Normal file
31
FlippR-Driver/include/output/IOutputDisplay.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* IOutputDisplay.h
|
||||
*
|
||||
* Created on: Nov 20, 2018
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#ifndef SRC_OUTPUT_IOUTPUTDISPLAY_H_
|
||||
#define SRC_OUTPUT_IOUTPUTDISPLAY_H_
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
{
|
||||
|
||||
class IDisplay
|
||||
{
|
||||
|
||||
public:
|
||||
IDisplay();
|
||||
virtual ~IDisplay();
|
||||
|
||||
virtual void write_score(int score) = 0;
|
||||
virtual void write_content(std::array<char, DigitCount> content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* SRC_OUTPUT_IOUTPUTDISPLAY_H_ */
|
||||
24
FlippR-Driver/include/output/ISevenDigitDisplay.h
Normal file
24
FlippR-Driver/include/output/ISevenDigitDisplay.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Created by rhetenor on 20.11.18.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||
#define FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace flippr_driver
|
||||
{
|
||||
namespace output
|
||||
{
|
||||
|
||||
class ISevenDigitDisplay
|
||||
{
|
||||
public:
|
||||
virtual void write_score(int score);
|
||||
virtual void write_content(std::array<char, 7> content);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif //FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||
Reference in New Issue
Block a user