Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
include cleanups (mostly surf/surf.hpp)
[simgrid.git] / src / surf / xml / surfxml_sax_cb.cpp
index 62947af..6bac0f9 100644 (file)
@@ -3,18 +3,18 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "simgrid/Exception.hpp"
-#include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid/s4u/Engine.hpp"
+#include <simgrid/Exception.hpp>
+#include <simgrid/kernel/routing/NetPoint.hpp>
+#include <simgrid/s4u/Engine.hpp>
+#include <xbt/file.hpp>
+#include <xbt/parse_units.hpp>
+
 #include "simgrid/sg_config.hpp"
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/xml/platf_private.hpp"
-#include "surf/surf.hpp"
-#include "xbt/file.hpp"
-#include "xbt/parse_units.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -481,19 +481,20 @@ void ETag_surfxml_link(){
 
 void STag_surfxml_link___ctn()
 {
+  const auto engine = simgrid::s4u::Engine::get_instance();
   const simgrid::s4u::Link* link;
   simgrid::s4u::LinkInRoute::Direction direction = simgrid::s4u::LinkInRoute::Direction::NONE;
   switch (A_surfxml_link___ctn_direction) {
   case AU_surfxml_link___ctn_direction:
   case A_surfxml_link___ctn_direction_NONE:
-    link = simgrid::s4u::Link::by_name(std::string(A_surfxml_link___ctn_id));
+    link = engine->link_by_name(std::string(A_surfxml_link___ctn_id));
     break;
   case A_surfxml_link___ctn_direction_UP:
-    link      = simgrid::s4u::SplitDuplexLink::by_name(std::string(A_surfxml_link___ctn_id));
+    link      = engine->split_duplex_link_by_name(std::string(A_surfxml_link___ctn_id));
     direction = simgrid::s4u::LinkInRoute::Direction::UP;
     break;
   case A_surfxml_link___ctn_direction_DOWN:
-    link      = simgrid::s4u::SplitDuplexLink::by_name(std::string(A_surfxml_link___ctn_id));
+    link      = engine->split_duplex_link_by_name(std::string(A_surfxml_link___ctn_id));
     direction = simgrid::s4u::LinkInRoute::Direction::DOWN;
     break;
   default: