Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
various small cosmetics in the routing
[simgrid.git] / src / kernel / routing / AsImpl.cpp
index 9fe0cef..0a84c25 100644 (file)
@@ -25,7 +25,6 @@ namespace simgrid {
     xbt_lib_set(as_router_lib, name, ROUTING_ASR_LEVEL, static_cast<void*>(netcard_));
     XBT_DEBUG("AS '%s' created with the id '%d'", name, netcard_->id());
   }
-  AsImpl::~AsImpl() = default;
 
   simgrid::s4u::Host* AsImpl::createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount)
   {
@@ -43,6 +42,13 @@ namespace simgrid {
 
   void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
   {
+    // recursing only. I have no route myself :)
+    char* key;
+    xbt_dict_cursor_t cursor = nullptr;
+    AsImpl* rc_child;
+    xbt_dict_foreach (children(), cursor, key, rc_child) {
+      rc_child->getOneLinkRoutes(accumulator);
+    }
   }
 
   /** @brief Get the common ancestor and its first children in each line leading to src and dst