just made it
This commit is contained in:
@@ -26,17 +26,16 @@ public:
|
||||
Display(int address, int id);
|
||||
virtual ~Display() = default;
|
||||
|
||||
virtual int getID();
|
||||
|
||||
virtual void write_score(int score);
|
||||
virtual void write_content(std::array<char, DigitCount> content);
|
||||
|
||||
virtual std::vector<char> get_content();
|
||||
|
||||
public:
|
||||
std::array<char, DigitCount> content;
|
||||
|
||||
private:
|
||||
int address;
|
||||
int id;
|
||||
|
||||
std::string fit_string(std::string &score_string);
|
||||
};
|
||||
|
||||
@@ -61,6 +61,12 @@ void Display<DigitCount>::write_content( std::array<char, DigitCount> content)
|
||||
this->content = content;
|
||||
}
|
||||
|
||||
<int DigitCount>
|
||||
std::vector<char> Display<DigitCount>::get_content()
|
||||
{
|
||||
return std::vector<char>(content, content + DigitCount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef _SRC_OUTPUT_IDISPLAY_H_
|
||||
#define _SRC_OUTPUT_IDISPLAY_H_
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
IDisplay();
|
||||
virtual ~IDisplay();
|
||||
|
||||
virtual int getID() = 0;
|
||||
virtual std::vector<char> get_content() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user