Impelements and integrates DisplayFactory. Further does some refactoring

This commit is contained in:
Johannes Wendel
2020-01-06 12:42:04 +01:00
parent 10b200e4e4
commit fda8197a26
21 changed files with 192 additions and 127 deletions

View File

@@ -31,9 +31,9 @@ namespace output
class OutputDriver
{
public:
OutputDriver(std::unique_ptr<output::DisplayController> display_controller, std::map<std::string, std::shared_ptr<items::Solenoid>> solenoids,
OutputDriver(std::shared_ptr<output::DisplayController> display_controller, std::map<std::string, std::shared_ptr<items::Solenoid>> solenoids,
std::map<std::string, std::shared_ptr<items::Lamp>> lamps, std::map<std::string, std::shared_ptr<items::Sound>> sounds,
std::map<std::string, std::shared_ptr<items::Flipper>> flippers, std::map<uint8_t, std::shared_ptr<output::items::Display>> displays);
std::map<std::string, std::shared_ptr<items::Flipper>> flippers, std::map<std::string, std::shared_ptr<output::items::Display>> displays);
~OutputDriver() = default;
@@ -62,13 +62,13 @@ public:
boost::optional<std::shared_ptr<items::Display>> get_display(uint8_t number) const;
private:
std::unique_ptr<output::DisplayController> display_controller;
std::shared_ptr<output::DisplayController> display_controller;
const std::map<std::string, std::shared_ptr<items::Lamp>> lamps;
const std::map<std::string, std::shared_ptr<items::Solenoid>> solenoids;
const std::map<std::string, std::shared_ptr<items::Sound>> sounds;
const std::map<std::string, std::shared_ptr<items::Flipper>> flippers;
const std::map<uint8_t, std::shared_ptr<items::Display>> displays;
const std::map<std::string, std::shared_ptr<items::Display>> displays;
};
} /* namespace output */