28 lines
846 B
C++
28 lines
846 B
C++
#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<const ModulePrototype> ModulePrototype::setName(const QString &val) const{
|
|
auto ninst = std::static_pointer_cast<ModulePrototype>(std::const_pointer_cast<RuntimeItem>(this->clone()));
|
|
ninst->module_name = val;
|
|
ninst->itemNotify([ninst, this](std::shared_ptr<ItemListener> p) { p->itemHasbeenUpdated(ninst, this->shared_from_this()); });
|
|
return ninst;
|
|
}
|
|
|
|
std::shared_ptr<const RuntimeItem> ModulePrototype::clone() const
|
|
{
|
|
return std::make_shared<ModulePrototype>(*this);
|
|
}
|