Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'odpor-implementation' into 'master'
[simgrid.git] / include / simgrid / kernel / routing / StarZone.hpp
index 9327c3b..dc533e0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -11,9 +11,7 @@
 #include <unordered_map>
 #include <unordered_set>
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 
 /** @ingroup ROUTING_API
  *  @brief NetZone where components are connected following a star topology
@@ -75,9 +73,9 @@ public:
 private:
   class StarRoute {
   public:
-    std::vector<resource::LinkImpl*> links_up;   //!< list of links UP for route (can be empty)
-    std::vector<resource::LinkImpl*> links_down; //!< list of links DOWN for route (can be empty)
-    std::vector<resource::LinkImpl*> loopback;   //!< loopback links, cannot be empty if configured
+    std::vector<resource::StandardLinkImpl*> links_up;   //!< list of links UP for route (can be empty)
+    std::vector<resource::StandardLinkImpl*> links_down; //!< list of links DOWN for route (can be empty)
+    std::vector<resource::StandardLinkImpl*> loopback;   //!< loopback links, cannot be empty if configured
     bool links_up_set   = false;                 //!< bool to indicate that links_up was configured (empty or not)
     bool links_down_set = false;                 //!< same for links_down
     NetPoint* gateway   = nullptr;
@@ -86,15 +84,13 @@ private:
     bool has_links_down() const { return links_down_set; }
   };
   /** @brief Auxiliary method to add links to a route */
-  void add_links_to_route(const std::vector<resource::LinkImpl*>& links, Route* route, double* latency,
-                          std::unordered_set<resource::LinkImpl*>& added_links) const;
+  void add_links_to_route(const std::vector<resource::StandardLinkImpl*>& links, Route* route, double* latency,
+                          std::unordered_set<resource::StandardLinkImpl*>& added_links) const;
   /** @brief Auxiliary methods to check params received in add_route method */
   void check_add_route_param(const NetPoint* src, const NetPoint* dst, const NetPoint* gw_src, const NetPoint* gw_dst,
                              bool symmetrical) const;
   std::unordered_map<unsigned long, StarRoute> routes_;
 };
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
 
 #endif /* SIMGRID_KERNEL_ROUTING_STARZONE_HPP_ */