X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7adf7d3cc45bf13462b257c7e3bc8a2eae2bf981..9383e83f66e7cb0180d6acfc435d2622615c2c7f:/src/instr/instr_paje_containers.cpp diff --git a/src/instr/instr_paje_containers.cpp b/src/instr/instr_paje_containers.cpp index 2b16c72199..0f9b0cede3 100644 --- a/src/instr/instr_paje_containers.cpp +++ b/src/instr/instr_paje_containers.cpp @@ -44,7 +44,7 @@ NetZoneContainer::NetZoneContainer(std::string name, unsigned int level, NetZone father_->children_.insert({getName(), this}); logCreation(); } else { - type_ = Type::createRootType(); + type_ = new ContainerType("0"); rootContainer = this; } } @@ -225,5 +225,24 @@ void Container::logDestruction() THROW_IMPOSSIBLE; } } + +StateType* Container::getState(std::string name) +{ + StateType* ret = dynamic_cast(type_->byName(name)); + ret->setCallingContainer(this); + return ret; +} + +LinkType* Container::getLink(std::string name) +{ + return dynamic_cast(type_->byName(name)); +} + +VariableType* Container::getVariable(std::string name) +{ + VariableType* ret = dynamic_cast(type_->byName(name)); + ret->setCallingContainer(this); + return ret; +} } }