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)
{
return res;
}
- void AsImpl::getOneLinkRoutes(xbt_dynar_t accumulator)
+ 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