add possibility to write content unfitted
This commit is contained in:
@@ -24,6 +24,7 @@ public:
|
||||
virtual ~Display() = default;
|
||||
|
||||
virtual void write_score(uint64_t score) = 0;
|
||||
virtual void write_content(std::string & content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ class EightDigitDisplay : public virtual Display
|
||||
{
|
||||
public:
|
||||
virtual ~EightDigitDisplay() = default;
|
||||
|
||||
virtual void write_content(std::string content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ class SevenDigitDisplay : public virtual Display
|
||||
{
|
||||
public:
|
||||
virtual ~SevenDigitDisplay() = default;
|
||||
|
||||
virtual void write_content(std::string & content) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -262,6 +262,10 @@ boost::optional<Poco::JSON::Object> OutputRequestHandler::parseDisplay(const std
|
||||
throw new Poco::InvalidArgumentException("Could not convert " + score + " to a number!\n" + e.what());
|
||||
}
|
||||
}
|
||||
else if(action == "write_content")
|
||||
{
|
||||
display->write_content(score);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Poco::NotFoundException("No Action with name \"" + action + "\" on sounds!");
|
||||
|
||||
Reference in New Issue
Block a user