now compiling

This commit is contained in:
Johannes Wendel
2019-06-18 14:54:09 +02:00
parent 44432bec85
commit 88270082c4
6 changed files with 72 additions and 39 deletions

View File

@@ -23,32 +23,34 @@ namespace output
{
namespace OutputDriverFactory
{
std::shared_ptr<OutputDriver> get_OutputDriver(std::istream &output_pin_config, std::istream &solenoid_config, std::istream &lamp_config, std::istream &sound_config, std::istream &display_config);
std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& output_pin_config,
std::istream& solenoid_config,
std::istream& lamp_config,
std::istream& sound_config,
std::istream& display_config);
namespace
{
std::map<std::string, std::shared_ptr<items::Solenoid>> create_solenoids(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoid_json, std::shared_ptr<DriverBoardPinController> &pin_controller, std::chrono::milliseconds &deactivation_time);
std::map<std::string, std::shared_ptr<items::Lamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Lamp> create_lamp(nlohmann::json &lamp_json, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::map<std::string, std::shared_ptr<items::Solenoid>> create_solenoids(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoid_json, std::shared_ptr<DriverBoardPinController> &pin_controller, std::chrono::milliseconds &deactivation_time);
std::map<std::string, std::shared_ptr<items::Flipper>> create_flippers(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Flipper> create_flipper(nlohmann::json &flipper_json, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::map<std::string, std::shared_ptr<items::Lamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Lamp> create_lamp(nlohmann::json &lamp_json, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream &sound_config, std::shared_ptr<SoundBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Sound> create_sound(nlohmann::json &sound_json, std::shared_ptr<SoundBoardPinController> &pin_controller, std::chrono::milliseconds &deactivation_time);
std::map<std::string, std::shared_ptr<items::Flipper>> create_flippers(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Flipper> create_flipper(nlohmann::json &flipper_json, std::shared_ptr<DriverBoardPinController> &pin_controller);
std::chrono::milliseconds get_deactivation_time(nlohmann::json &json);
std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream &sound_config, std::shared_ptr<SoundBoardPinController> &pin_controller);
std::shared_ptr<items::detail::Sound> create_sound(nlohmann::json &sound_json, std::shared_ptr<SoundBoardPinController> &pin_controller, std::chrono::milliseconds &deactivation_time);
std::vector<std::shared_ptr<items::OutputDisplay>> create_displays(std::istream &display_config);
std::map<uint8_t, std::shared_ptr<items::Display>> map_displays(const std::vector<std::shared_ptr<items::OutputDisplay>> &displays);
std::shared_ptr<items::OutputDisplay> create_display(nlohmann::json &display_json);
std::chrono::milliseconds get_deactivation_time(nlohmann::json &json);
std::map<std::string, uint8_t> parse_pins_driver_board(nlohmann::json &driver_board_config);
std::map<std::string, uint8_t> parse_pins_sound_board(nlohmann::json &sound_board_config);
std::map<std::string, uint8_t> parse_pins_display_board(nlohmann::json &display_board_config);
}
std::vector<std::shared_ptr<items::OutputDisplay>> create_displays(std::istream &display_config);
std::map<uint8_t, std::shared_ptr<items::Display>> map_displays(const std::vector<std::shared_ptr<items::OutputDisplay>> &displays);
std::shared_ptr<items::OutputDisplay> create_display(nlohmann::json &display_json);
std::map<std::string, uint8_t> parse_pins_driver_board(nlohmann::json &driver_board_config);
std::map<std::string, uint8_t> parse_pins_sound_board(nlohmann::json &sound_board_config);
std::map<std::string, uint8_t> parse_pins_display_board(nlohmann::json &display_board_config);
}
}
}