public:
enum class SharingPolicy { SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
- virtual void destroy();
kernel::resource::LinkImpl* get_impl() { return pimpl_; }
/** @brief Retrieve a link from its name */
#include "simgrid/kernel/routing/NetPoint.hpp"
#include "simgrid/kernel/routing/NetZoneImpl.hpp"
#include "simgrid/s4u/Host.hpp"
-#include "simgrid/s4u/Link.hpp"
#include "src/surf/StorageImpl.hpp"
+#include "src/surf/network_interface.hpp"
#include <algorithm>
for (auto const& kv : storages_)
if (kv.second)
kv.second->getImpl()->destroy();
+
for (auto const& kv : links_)
if (kv.second)
- (kv.second)->destroy();
+ kv.second->get_impl()->destroy();
}
}
}
simgrid::xbt::signal<void(kernel::resource::NetworkAction*, Host* src, Host* dst)> Link::on_communicate;
simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> Link::on_communication_state_change;
-void Link::destroy()
-{
- if (not currentlyDestroying_) {
- currentlyDestroying_ = true;
- on_destruction(*this);
- Engine::get_instance()->link_unregister(std::string(pimpl_->get_cname()));
- }
-}
-
Link* Link::by_name(std::string name)
{
return Engine::get_instance()->link_by_name(name);