Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
still fighting against this code
[simgrid.git] / src / s4u / s4u_Netzone.cpp
index 2e13264..6109f66 100644 (file)
@@ -67,7 +67,7 @@ std::vector<Host*> NetZone::get_all_hosts() const
   return pimpl_->get_all_hosts();
 }
 
-int NetZone::get_host_count()
+int NetZone::get_host_count() const
 {
   return pimpl_->get_host_count();
 }
@@ -89,6 +89,15 @@ void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::
 {
   pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
 }
+
+void NetZone::extract_xbt_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt_node_t>* nodes,
+                                std::map<std::string, xbt_edge_t>* edges)
+{
+  for (auto const& child : get_children())
+    child->extract_xbt_graph(graph, nodes, edges);
+
+  pimpl_->get_graph(graph, nodes, edges);
+}
 } // namespace s4u
 } // namespace simgrid