templaaates
This commit is contained in:
18
FlippR-Driver/include/IEightDigitDisplay.h
Normal file
18
FlippR-Driver/include/IEightDigitDisplay.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// Created by rhetenor on 20.11.18.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||||
|
#define FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
class IEightDigitDisplay
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void write_score(int score);
|
||||||
|
virtual void write_content(std::array<char, 8> content);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //FLIPPR_DRIVER_IEIGHTDIGITDISPLAY_H
|
||||||
16
FlippR-Driver/include/ISevenDigitDisplay.h
Normal file
16
FlippR-Driver/include/ISevenDigitDisplay.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by rhetenor on 20.11.18.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||||
|
#define FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
class ISevenDigitDisplay
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void write_score(int score);
|
||||||
|
virtual void write_content(std::array<char, 7> content);
|
||||||
|
};
|
||||||
|
#endif //FLIPPR_DRIVER_ISEVENDIGITDISPLAY_H
|
||||||
19
FlippR-Driver/src/output/EightDigitDisplay.h
Normal file
19
FlippR-Driver/src/output/EightDigitDisplay.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Created by rhetenor on 20.11.18.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|
||||||
|
#define FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|
||||||
|
|
||||||
|
#include "IEightDigitDisplay"
|
||||||
|
|
||||||
|
namespace flippr_driver
|
||||||
|
{
|
||||||
|
namespace output
|
||||||
|
{
|
||||||
|
|
||||||
|
class EightDigitDisplay : public Display<8>, IEightDigitDisplay;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif //FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|
||||||
17
FlippR-Driver/src/output/SevenDigitDisplay.h
Normal file
17
FlippR-Driver/src/output/SevenDigitDisplay.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// Created by rhetenor on 20.11.18.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLIPPR_DRIVER_SEVENDIGITDISPLAY_H
|
||||||
|
#define FLIPPR_DRIVER_SEVENDIGITDISPLAY_H
|
||||||
|
|
||||||
|
namespace flippr_driver
|
||||||
|
{
|
||||||
|
namespace output
|
||||||
|
{
|
||||||
|
|
||||||
|
class SevenDigitDisplay : public Display<7>, ISevenDigitDisplay;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif //FLIPPR_DRIVER_SEVENDIGITDISPLAY_H
|
||||||
Reference in New Issue
Block a user