#ifndef MDD_BASEMODULE_H #define MDD_BASEMODULE_H #include #include #include "IModule.h" #include "Output.h" #include struct Input { std::string name; rapidjson::Value value; std::function verification; std::shared_ptr output; Input(std::string name, rapidjson::Value value, std::function verification = [](rapidjson::Value&){return true;}); }; class ModuleBase : IModule { std::vector inputs; public: std::vector getInputs(); int addInput(std::string name, rapidjson::Value value, std::function verification = [](rapidjson::Value&){return true;}); bool connectInput(std::string input_name, std::shared_ptr output); const rapidjson::Value& getValue(int handle); }; #endif //MDD_BASEMODULE_H