extended interface
This commit is contained in:
@@ -10,14 +10,7 @@
|
||||
|
||||
#include "output/IOutputDriver.h"
|
||||
|
||||
#include "output/items/ILamp.h"
|
||||
#include "output/items/ISolenoid.h"
|
||||
#include "output/items/IDisplay.h"
|
||||
#include "output/items/ISound.h"
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -31,21 +24,21 @@ public:
|
||||
|
||||
virtual ~OutputDriver() = default;
|
||||
// todo what is flipper_relay ?
|
||||
std::vector<std::shared_ptr<items::ILamp>> get_lamps();
|
||||
std::vector<std::shared_ptr<items::ISolenoid>> get_solenoids();
|
||||
std::vector<std::shared_ptr<items::ISound>> get_sounds();
|
||||
std::vector<std::shared_ptr<items::IDisplay>> get_displays();
|
||||
std::vector<std::shared_ptr<items::ILamp>> get_lamps() override;
|
||||
std::vector<std::shared_ptr<items::ISolenoid>> get_solenoids() override;
|
||||
std::vector<std::shared_ptr<items::ISound>> get_sounds() override;
|
||||
std::vector<std::shared_ptr<items::IDisplay>> get_displays() override;
|
||||
|
||||
std::shared_ptr<items::ILamp> get_lamp(std::string name);
|
||||
std::shared_ptr<items::ISolenoid> get_solenoid(std::string name);
|
||||
std::shared_ptr<items::ISound> get_sound(std::string name);
|
||||
std::shared_ptr<items::IDisplay> get_display(char number);
|
||||
boost::optional<std::shared_ptr<items::ILamp>> get_lamp(std::string name) override;
|
||||
boost::optional<std::shared_ptr<items::ISolenoid>> get_solenoid(std::string name) override;
|
||||
boost::optional<std::shared_ptr<items::ISound>> get_sound(std::string name) override;
|
||||
boost::optional<std::shared_ptr<items::IDisplay>> get_display(char number) override;
|
||||
|
||||
private:
|
||||
std::map<std::string, std::shared_ptr<items::ILamp>> lamps;
|
||||
std::map<std::string, std::shared_ptr<items::ISolenoid>> solenoids;
|
||||
std::map<char, std::shared_ptr<items::IDisplay>> displays;
|
||||
std::map<std::string, std::shared_ptr<items::ISound>> sounds;
|
||||
const std::map<std::string, std::shared_ptr<items::ILamp>> lamps;
|
||||
const std::map<std::string, std::shared_ptr<items::ISolenoid>> solenoids;
|
||||
const std::map<char, std::shared_ptr<items::IDisplay>> displays;
|
||||
const std::map<std::string, std::shared_ptr<items::ISound>> sounds;
|
||||
};
|
||||
|
||||
} /* namespace output */
|
||||
|
||||
Reference in New Issue
Block a user