-boost::unordered_map<std::string, Storage*> const& Host::mountedStorages() {
- if (mounts == nullptr) {
- mounts = new boost::unordered_map<std::string, Storage*> ();
-
- xbt_dict_t dict = this->mountedStoragesAsDict();
-
- xbt_dict_cursor_t cursor;
- char *mountname;
- char *storagename;
- xbt_dict_foreach(dict, cursor, mountname, storagename) {
- mounts->insert({mountname, &Storage::byName(storagename)});
- }
- xbt_dict_free(&dict);
+/** @brief Just like Host::routeTo, but filling an array of link implementations */
+void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* latency)
+{
+ simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
+ if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
+ XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", getCname(), dest->getCname(),
+ (latency == nullptr ? -1 : *latency));
+ for (auto const& link : *links)
+ XBT_CDEBUG(surf_route, "Link %s", link->getCname());