From 7c6bbb40c161610ef1a8096ec469e8b9a703de0a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 31 May 2018 17:38:05 +0200 Subject: [PATCH] snake_case the s4u::NetZone signals Deprecation wrapper are impossible --- include/simgrid/s4u/NetZone.hpp | 6 +++--- src/instr/instr_platform.cpp | 4 ++-- src/kernel/routing/RoutedZone.cpp | 2 +- src/s4u/s4u_Netzone.cpp | 6 +++--- src/surf/network_ns3.cpp | 2 +- src/surf/sg_platf.cpp | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index 990624a475..fbf51ba20c 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -79,9 +79,9 @@ public: static simgrid::xbt::signal& link_list)> - onRouteCreation; - static simgrid::xbt::signal onCreation; - static simgrid::xbt::signal onSeal; + on_route_creation; + static simgrid::xbt::signal on_creation; + static simgrid::xbt::signal on_seal; protected: unsigned int getTableSize() { return vertices_.size(); } diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index 59b16ddcd0..6bf58f3e87 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -351,10 +351,10 @@ void instr_define_callbacks() simgrid::s4u::Host::on_speed_change.connect(instr_host_on_speed_change); simgrid::s4u::Link::on_creation.connect(instr_link_on_creation); simgrid::s4u::Link::on_bandwidth_change.connect(instr_link_on_bandwidth_change); - simgrid::s4u::NetZone::onSeal.connect([](simgrid::s4u::NetZone& /*netzone*/) { currentContainer.pop_back(); }); + simgrid::s4u::NetZone::on_seal.connect([](simgrid::s4u::NetZone& /*netzone*/) { currentContainer.pop_back(); }); simgrid::kernel::routing::NetPoint::onCreation.connect(instr_netpoint_on_creation); } - simgrid::s4u::NetZone::onCreation.connect(instr_netzone_on_creation); + simgrid::s4u::NetZone::on_creation.connect(instr_netzone_on_creation); simgrid::surf::CpuAction::on_state_change.connect(instr_cpu_action_on_state_change); simgrid::s4u::Link::on_communication_state_change.connect(instr_link_on_communication_state_change); diff --git a/src/kernel/routing/RoutedZone.cpp b/src/kernel/routing/RoutedZone.cpp index 249320a36b..f6585e638c 100644 --- a/src/kernel/routing/RoutedZone.cpp +++ b/src/kernel/routing/RoutedZone.cpp @@ -201,7 +201,7 @@ void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_ dstName, gw_dst->get_cname()); } - onRouteCreation(symmetrical, src, dst, gw_src, gw_dst, link_list); + on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list); } } } diff --git a/src/s4u/s4u_Netzone.cpp b/src/s4u/s4u_Netzone.cpp index 5e1387a89c..5eb5139489 100644 --- a/src/s4u/s4u_Netzone.cpp +++ b/src/s4u/s4u_Netzone.cpp @@ -17,9 +17,9 @@ namespace s4u { simgrid::xbt::signal& link_list)> - NetZone::onRouteCreation; -simgrid::xbt::signal NetZone::onCreation; -simgrid::xbt::signal NetZone::onSeal; + NetZone::on_route_creation; +simgrid::xbt::signal NetZone::on_creation; +simgrid::xbt::signal NetZone::on_seal; NetZone::NetZone(NetZone* father, std::string name) : father_(father), name_(name) { diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 0312d24790..99d34a8685 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -166,7 +166,7 @@ NetworkNS3Model::NetworkNS3Model() : NetworkModel(Model::UpdateAlgo::FULL) simgrid::surf::on_cluster.connect(&clusterCreation_cb); simgrid::s4u::on_platform_created.connect(&postparse_cb); - simgrid::s4u::NetZone::onRouteCreation.connect(&routeCreation_cb); + simgrid::s4u::NetZone::on_route_creation.connect(&routeCreation_cb); } NetworkNS3Model::~NetworkNS3Model() { diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 416a7a19e1..2817796bc1 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -610,7 +610,7 @@ simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCre /* set the new current component of the tree */ current_routing = new_zone; - simgrid::s4u::NetZone::onCreation(*new_zone); // notify the signal + simgrid::s4u::NetZone::on_creation(*new_zone); // notify the signal return new_zone; } @@ -625,7 +625,7 @@ void sg_platf_new_Zone_seal() { xbt_assert(current_routing, "Cannot seal the current AS: none under construction"); current_routing->seal(); - simgrid::s4u::NetZone::onSeal(*current_routing); + simgrid::s4u::NetZone::on_seal(*current_routing); current_routing = static_cast(current_routing->get_father()); } -- 2.20.1