return res;
}
-NetZone* NetZone::add_child(const NetZone* new_zone)
+NetZone* NetZone::add_child(NetZone* new_zone)
{
- pimpl_->add_child(new_zone->get_impl());
+ new_zone->set_parent(this);
return this;
}
NetZone* NetZone::set_parent(const NetZone* parent)
{
- pimpl_->set_parent(parent->get_impl());
+ kernel::actor::simcall([this, parent] { pimpl_->set_parent(parent->get_impl()); });
return this;
}
pimpl_->get_graph(graph, nodes, edges);
}
+void NetZone::seal()
+{
+ kernel::actor::simcall([this] { pimpl_->seal(); });
+}
+
s4u::Host* NetZone::create_host(const std::string& name, const std::vector<double>& speed_per_pstate)
{
return kernel::actor::simcall(
return create_host(name, Host::convert_pstate_speed_vector(speed_per_pstate));
}
-s4u::Link* NetZone::create_link(const std::string& name, const std::vector<double>& bandwidths,
- s4u::Link::SharingPolicy policy)
+s4u::Link* NetZone::create_link(const std::string& name, const std::vector<double>& bandwidths)
{
- return kernel::actor::simcall(
- [this, &name, &bandwidths, &policy] { return pimpl_->create_link(name, bandwidths, policy); });
+ return kernel::actor::simcall([this, &name, &bandwidths] { return pimpl_->create_link(name, bandwidths); });
}
-s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidths,
- s4u::Link::SharingPolicy policy)
+s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidths)
{
std::vector<double> bw;
bw.reserve(bandwidths.size());
std::string(". Invalid bandwidth: ") + speed_str);
}
}
- return create_link(name, bw, policy);
+ return create_link(name, bw);
}
} // namespace s4u