X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b035f4fba1852d16bb9316bb0b23329b108b605b..096bd885787fc858262059ac8ad284ca3aa47397:/src/kernel/routing/AsImpl.cpp diff --git a/src/kernel/routing/AsImpl.cpp b/src/kernel/routing/AsImpl.cpp index 33688aca30..0a84c25f83 100644 --- a/src/kernel/routing/AsImpl.cpp +++ b/src/kernel/routing/AsImpl.cpp @@ -25,7 +25,6 @@ namespace simgrid { xbt_lib_set(as_router_lib, name, ROUTING_ASR_LEVEL, static_cast(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* speedPerPstate, int coreAmount) { @@ -41,8 +40,15 @@ namespace simgrid { return res; } - void AsImpl::getOneLinkRoutes(xbt_dynar_t accumulator) + void AsImpl::getOneLinkRoutes(std::vector* 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