Impelements and integrates DisplayFactory. Further does some refactoring
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user