Files
flippr-code/FlippR-Driver/src/output/OutputDriver.h
Jonas Zeunert 6367e79898 factoryyyyyN
2018-12-10 23:49:29 +01:00

48 lines
1.6 KiB
C++

/*
* OutputDriver.h
*
* Created on: Aug 2, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
*/
#ifndef _SRC_OUTPUT_OUTPUTDRIVER_H_
#define _SRC_OUTPUT_OUTPUTDRIVER_H_
#include "output/IOutputDriver.h"
#include <map>
namespace flippR_driver
{
namespace output
{
class OutputDriver : public IOutputDriver
{
public:
OutputDriver(std::map<std::string, std::shared_ptr<items::ISolenoid>> solenoids, std::map<std::string, std::shared_ptr<items::ILamp>> lamps, std::map<std::string, std::shared_ptr<items::ISound>> sounds, std::map<char, std::shared_ptr<items::IDisplay>> displays);
~OutputDriver() override = default;
// todo what is flipper_relay ?
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;
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:
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<std::string, std::shared_ptr<items::ISound>> sounds;
const std::map<char, std::shared_ptr<items::IDisplay>> displays;
};
} /* namespace output */
}
#endif