some refactoring

This commit is contained in:
Jonas Zeunert
2018-11-20 22:52:10 +01:00
parent 2842ac20bb
commit 22f7c43cf0
18 changed files with 32 additions and 18 deletions

View File

@@ -8,7 +8,7 @@
#include <fstream>
#include <memory>
#include "IInputDriver.h"
#include "input/IInputDriver.h"
namespace flippR_driver
{

View File

@@ -15,7 +15,7 @@
#include "IInputDriver.h"
#include "IEventHandler.h"
#include "Event.h"
#include "input/Event.h"
namespace flippR_driver
{

View File

@@ -8,7 +8,7 @@
#ifndef SRC_IEVENTHANDLER_H_
#define SRC_IEVENTHANDLER_H_
#include "Event.h"
#include "input/Event.h"
class IEventHandler
{

View File

@@ -8,7 +8,7 @@
#ifndef SRC_INPUT_IINPUTDRIVER_H_
#define SRC_INPUT_IINPUTDRIVER_H_
#include "IEventHandler.h"
#include "input/IEventHandler.h"
#include <memory>
namespace flippR_driver

View File

@@ -7,12 +7,18 @@
#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

View 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_ */

View File

@@ -7,10 +7,18 @@
#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