Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
enough playing with instr for now ...
[simgrid.git] / src / instr / instr_paje_containers.cpp
index 40b6fb0..0f9b0ce 100644 (file)
@@ -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;
   }
 }
@@ -232,5 +232,17 @@ StateType* Container::getState(std::string name)
   ret->setCallingContainer(this);
   return ret;
 }
+
+LinkType* Container::getLink(std::string name)
+{
+  return dynamic_cast<LinkType*>(type_->byName(name));
+}
+
+VariableType* Container::getVariable(std::string name)
+{
+  VariableType* ret = dynamic_cast<VariableType*>(type_->byName(name));
+  ret->setCallingContainer(this);
+  return ret;
+}
 }
 }