Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove an instance of namespace surf
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 16 Dec 2019 09:09:18 +0000 (10:09 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 16 Dec 2019 09:09:18 +0000 (10:09 +0100)
src/surf/network_ns3.cpp
src/surf/sg_platf.cpp
src/surf/xml/platf_private.hpp

index 711f4f2..74d8e40 100644 (file)
@@ -165,7 +165,7 @@ NetworkNS3Model::NetworkNS3Model() : NetworkModel(Model::UpdateAlgo::FULL)
     pt.extension_set<NetPointNs3>(new NetPointNs3());
     XBT_VERB("SimGrid's %s is known as node %d within ns-3", pt.get_cname(), pt.extension<NetPointNs3>()->node_num);
   });
     pt.extension_set<NetPointNs3>(new NetPointNs3());
     XBT_VERB("SimGrid's %s is known as node %d within ns-3", pt.get_cname(), pt.extension<NetPointNs3>()->node_num);
   });
-  surf::on_cluster.connect(&clusterCreation_cb);
+  routing::on_cluster_creation.connect(&clusterCreation_cb);
 
   s4u::Engine::on_platform_created.connect(&postparse_cb);
   s4u::NetZone::on_route_creation.connect(&routeCreation_cb);
 
   s4u::Engine::on_platform_created.connect(&postparse_cb);
   s4u::NetZone::on_route_creation.connect(&routeCreation_cb);
index 31f1a9b..98b7b87 100644 (file)
@@ -33,11 +33,12 @@ XBT_PRIVATE std::map<std::string, simgrid::kernel::resource::StorageImpl*> mount
 XBT_PRIVATE std::vector<std::string> known_storages;
 
 namespace simgrid {
 XBT_PRIVATE std::vector<std::string> known_storages;
 
 namespace simgrid {
-namespace surf {
-
-simgrid::xbt::signal<void(kernel::routing::ClusterCreationArgs const&)> on_cluster;
-}
-}
+namespace kernel {
+namespace routing {
+xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
+} // namespace routing
+} // namespace kernel
+} // namespace simgrid
 
 static int surf_parse_models_setup_already_called = 0;
 std::map<std::string, simgrid::kernel::resource::StorageType*> storage_types;
 
 static int surf_parse_models_setup_already_called = 0;
 std::map<std::string, simgrid::kernel::resource::StorageType*> storage_types;
@@ -57,7 +58,7 @@ void sg_platf_init()
 
 /** Module management function: frees all internal data structures */
 void sg_platf_exit() {
 
 /** Module management function: frees all internal data structures */
 void sg_platf_exit() {
-  simgrid::surf::on_cluster.disconnect_slots();
+  simgrid::kernel::routing::on_cluster_creation.disconnect_slots();
   simgrid::s4u::Engine::on_platform_created.disconnect_slots();
 
   /* make sure that we will reinit the models while loading the platf once reinited */
   simgrid::s4u::Engine::on_platform_created.disconnect_slots();
 
   /* make sure that we will reinit the models while loading the platf once reinited */
@@ -292,7 +293,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
   XBT_DEBUG("</AS>");
   sg_platf_new_Zone_seal();
 
   XBT_DEBUG("</AS>");
   sg_platf_new_Zone_seal();
 
-  simgrid::surf::on_cluster(*cluster);
+  simgrid::kernel::routing::on_cluster_creation(*cluster);
   delete cluster->radicals;
 }
 
   delete cluster->radicals;
 }
 
index 6133bea..fb0c3f0 100644 (file)
@@ -187,7 +187,12 @@ public:
   std::string id;
   int routing;
 };
   std::string id;
   int routing;
 };
-}}}
+
+extern XBT_PRIVATE xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
+
+} // namespace routing
+} // namespace kernel
+} // namespace simgrid
 
 /********** Routing **********/
 void routing_cluster_add_backbone(simgrid::kernel::resource::LinkImpl* bb);
 
 /********** Routing **********/
 void routing_cluster_add_backbone(simgrid::kernel::resource::LinkImpl* bb);
@@ -236,11 +241,4 @@ XBT_PUBLIC int surf_parse_get_debug();
 XBT_PUBLIC void surf_parse_set_debug(int bdebug);
 XBT_PUBLIC int surf_parse_lex_destroy();
 
 XBT_PUBLIC void surf_parse_set_debug(int bdebug);
 XBT_PUBLIC int surf_parse_lex_destroy();
 
-namespace simgrid {
-namespace surf {
-
-extern XBT_PRIVATE simgrid::xbt::signal<void(kernel::routing::ClusterCreationArgs const&)> on_cluster;
-}
-}
-
 #endif                          /* SG_PLATF_H */
 #endif                          /* SG_PLATF_H */