#ifndef MDD_ModuleBase_H #define MDD_ModuleBase_H #include "Input.h" #include "IModule.h" namespace mdd { class ModuleBase : public IModule{ private: std::string _prefix; std::string _type; int _appendix; std::vector> _inputs; std::vector> _outputs; protected: std::shared_ptr getOutput(int handle); std::shared_ptr getInput(int handle); int addInput(const std::string& type, const json& value, const std::function& verification = []( const json&) { return true; }); int addOutput(const std::string& type, const json& initial); public: std::vector getInputs() override; std::vector getInputIDs() override; std::vector getOutputs() override; std::vector getOutputIDs() override; std::shared_ptr getOutput(std::string output_id) override; std::shared_ptr getInput(std::string input_id) override; 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; void updateID() override ; }; } #endif //MDD_BASEMODULE_H