#include "Parameter.h" namespace mdd { Parameter::Parameter() : ModuleBase(R"JSON( [{ "name":"appendix", "value":0 }])JSON") { inputs.push_back(std::make_shared("Value", 0)); outputs.push_back(std::make_shared("Value", 0)); key = "Parameter"; setName(key); } state Parameter::update() { return getOutput(0)->setValue(getInput(0)->getValue()); } std::string Parameter::setName(const std::string& name) { //inputs[0]->setName(name); outputs[0]->setName(name); return name; } std::string Parameter::setAppendix(int appendix) { inputs[0]->setAppendix(appendix); outputs[0]->setAppendix(appendix); return ModuleBase::setAppendix(appendix); } bool Parameter::configureChild(const json& config) { auto jit = config.find("name"); if (jit != config.end()) { if (jit.value().get() == "appendix") { setAppendix(jit.value()["value"].get()); _base_config["configure"]["appendix"]["value"] = getAppendix(); } } return false; } }