#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;
public:
std::string addInput(const std::string& type, int appendix, const json& value,
const std::function& verification = [](
const json&) { return true; });
json& setInputDefaultValue(int handler) override;
json& setInputDefaultValue(std::string input_id) override;
const json& getInputValue(std::string input_id) override;
bool connectInput(std::string input_id, std::shared_ptr output) override;
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::string addOutput(const std::string& type, int appendix, const json& initial);
json &setOutputValue(int handle);
void 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;
};
}
#endif //MDD_BASEMODULE_H