X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eda3d282409cf5457333d4de459ad83afacaf599..19e1048a7009c4144b0f361ad85fb9dff44761ea:/src/surf/xml/surfxml_sax_cb.cpp diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 58eefa276e..1a0edf9536 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -28,8 +28,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf, "Logging specific to the SURF parsing module"); std::string surf_parsed_filename; // Currently parsed file (for the error messages) -std::vector - parsed_link_list; /* temporary store of current link list of a route */ +std::vector parsed_link_list; /* temporary store of current link list of a route */ /* Helping functions */ void surf_parse_assert(bool cond, const std::string& msg) @@ -482,17 +481,20 @@ void ETag_surfxml_link(){ void STag_surfxml_link___ctn() { - simgrid::kernel::resource::LinkImpl* link = nullptr; + 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))->get_impl(); + link = simgrid::s4u::Link::by_name(std::string(A_surfxml_link___ctn_id)); break; case A_surfxml_link___ctn_direction_UP: - link = simgrid::s4u::Link::by_name(std::string(A_surfxml_link___ctn_id) + "_UP")->get_impl(); + link = simgrid::s4u::SplitDuplexLink::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::Link::by_name(std::string(A_surfxml_link___ctn_id) + "_DOWN")->get_impl(); + link = simgrid::s4u::SplitDuplexLink::by_name(std::string(A_surfxml_link___ctn_id)); + direction = simgrid::s4u::LinkInRoute::Direction::DOWN; break; default: surf_parse_error(std::string("Invalid direction for link ") + A_surfxml_link___ctn_id); @@ -510,7 +512,7 @@ void STag_surfxml_link___ctn() dirname = ""; } surf_parse_assert(link != nullptr, std::string("No such link: '") + A_surfxml_link___ctn_id + "'" + dirname); - parsed_link_list.push_back(link); + parsed_link_list.emplace_back(simgrid::s4u::LinkInRoute(link, direction)); } void ETag_surfxml_backbone()