#include "moduleprototype.h" ModulePrototype::ModulePrototype() : RuntimeItem(AssembleType::MODULES_UNIT) { } ModulePrototype::ModulePrototype(const ModulePrototype &other) : RuntimeItem(other.baseType()) { this->module_name = other.module_name; } QString ModulePrototype::name() const { return this->module_name; } std::shared_ptr ModulePrototype::setName(const QString &val) const{ auto ninst = std::static_pointer_cast(std::const_pointer_cast(this->clone())); ninst->module_name = val; ninst->itemNotify([ninst, this](std::shared_ptr p) { p->itemHasbeenUpdated(ninst, this->shared_from_this()); }); return ninst; } std::shared_ptr ModulePrototype::clone() const { return std::make_shared(*this); }