]> AND Public Git Repository - simgrid.git/blobdiff - src/s4u/s4u_Netzone.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u::Host::create_disk, human-friendly string version
[simgrid.git] / src / s4u / s4u_Netzone.cpp
index 7645d5d3fb2da727f1baf34d32022d789b777cd6..4f97b64206d525c0238e8a0eb3041ce7e47150c7 100644 (file)
@@ -47,9 +47,9 @@ std::vector<NetZone*> NetZone::get_children() const
   return res;
 }
 
-NetZone* NetZone::add_child(const NetZone* new_zone)
+NetZone* NetZone::add_child(NetZone* new_zone)
 {
-  pimpl_->add_child(new_zone->get_impl());
+  new_zone->set_parent(this);
   return this;
 }
 
@@ -143,9 +143,10 @@ void NetZone::extract_xbt_graph(const s_xbt_graph_t* graph, std::map<std::string
   pimpl_->get_graph(graph, nodes, edges);
 }
 
-void NetZone::seal()
+NetZone* NetZone::seal()
 {
   kernel::actor::simcall([this] { pimpl_->seal(); });
+  return this;
 }
 
 s4u::Host* NetZone::create_host(const std::string& name, const std::vector<double>& speed_per_pstate)