Merge branch 'master' of github.com:swinginbird/flippr-code

This commit is contained in:
Johannes Wendel
2018-11-20 23:33:41 +01:00

View File

@@ -13,7 +13,8 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include "ICabinetItem.h" #include "ILamp.h"
#include "ISolenoid.h"
#include "IDisplay.h" #include "IDisplay.h"
#include "ISound.h" #include "ISound.h"
@@ -25,20 +26,23 @@ namespace output
class OutputDriver : public IOutputDriver class OutputDriver : public IOutputDriver
{ {
public: public:
OutputDriver(std::map<std::string, std::shared_ptr<IOutputtItem>> cabinet_items, std::map<char, std::shared_ptr<IDisplay>> displays, std::map<std::string, std::shared_ptr<ISound>> sounds); OutputDriver(std::map<std::string, std::shared_ptr<ISolenoid>> solenoids, std::map<std::string, std::shared_ptr<ILamp>> lamps, std::map<char, std::shared_ptr<IDisplay>> displays, std::map<std::string, std::shared_ptr<ISound>> sounds);
virtual ~OutputDriver() = default; virtual ~OutputDriver() = default;
std::vector<std::shared_ptr<IOutputtItem>> get_cabinet_items(); std::vector<std::shared_ptr<ILamp>> get_lamps();
std::vector<std::shared_ptr<ISolenoid>> get_solenoids();
std::vector<std::shared_ptr<ISound>> get_sounds(); std::vector<std::shared_ptr<ISound>> get_sounds();
std::vector<std::shared_ptr<IDisplay>> get_displays(); std::vector<std::shared_ptr<IDisplay>> get_displays();
std::shared_ptr<IOutputtItem> get_cabinet_item(std::string name); std::shared_ptr<ILamp> get_lamp(std::string name);
std::shared_ptr<ISolenoid> get_solenoid(std::string name);
std::shared_ptr<ISound> get_sound(std::string name); std::shared_ptr<ISound> get_sound(std::string name);
std::shared_ptr<IDisplay> get_display(char number); std::shared_ptr<IDisplay> get_display(char number);
private: private:
std::map<std::string, std::shared_ptr<IOutputtItem>> cabinet_items; std::map<std::string, std::shared_ptr<ILamp>> lamps;
std::map<std::string, std::shared_ptr<ISolenoid>> solenoids;
std::map<char, std::shared_ptr<IDisplay>> displays; std::map<char, std::shared_ptr<IDisplay>> displays;
std::map<std::string, std::shared_ptr<ISound>> sounds; std::map<std::string, std::shared_ptr<ISound>> sounds;
}; };