#ifndef MDD_INPUT_H #define MDD_INPUT_H #include #include #include "IInput.h" #include "IOutput.h" #include #include "IUnique.h" namespace mdd { class Input : public IInput{ private: std::string _prefix; std::string _type; int _appendix; json _value; std::function _verification; std::shared_ptr _output; public: Input(const std::string &type, int appendix, const json &default_value, const std::function &verification = []( const json &) { return true; }); std::string setType(std::string type) override; std::string getType() override; std::string getID() override; std::string setPrefix(std::string prefix) override; std::string setAppendix(int appendix) override; state getState() override; void resetState() override; const json& getValue() override; std::shared_ptr getConnection() override; json& setDefaultValue() override; bool verify(const json & data) override; bool connect(std::shared_ptr output) override; }; } #endif //MDD_INPUT_H