Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace "XBT_PUBLIC_CLASS" with "class XBT_PUBLIC".
[simgrid.git] / src / kernel / routing / NetZoneImpl.hpp
index 95f5ae3..acfb8d3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2018. 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. */
 
 #include "xbt/graph.h"
 
+#include "simgrid/forward.h"
 #include "simgrid/s4u/NetZone.hpp"
-#include "simgrid/s4u/forward.hpp"
+#include "src/surf/xml/platf_private.hpp" // FIXME: kill sg_platf_route_cbarg_t to remove that UGLY include
 
 namespace simgrid {
 namespace kernel {
-class EngineImpl;
 namespace routing {
 class BypassRoute;
 
@@ -48,8 +48,7 @@ class BypassRoute;
  * called Autonomous Systems in this article).
  *
  */
-XBT_PUBLIC_CLASS NetZoneImpl : public s4u::NetZone
-{
+class XBT_PUBLIC NetZoneImpl : public s4u::NetZone {
   friend simgrid::kernel::EngineImpl; // it destroys netRoot_
 
 protected:
@@ -61,7 +60,8 @@ public:
   simgrid::s4u::Host* createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
                                  std::map<std::string, std::string>* props);
   /** @brief Creates a new route in this NetZone */
-  void addBypassRoute(sg_platf_route_cbarg_t e_route) override;
+  void addBypassRoute(NetPoint * src, NetPoint * dst, NetPoint * gw_src, NetPoint * gw_dst,
+                      std::vector<simgrid::surf::LinkImpl*> & link_list, bool symmetrical) override;
 
 protected:
   /**
@@ -72,11 +72,11 @@ protected:
    * @param into Container into which the traversed links and gateway informations should be pushed
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
-  virtual void getLocalRoute(NetPoint * src, NetPoint * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
+  virtual void getLocalRoute(NetPoint * src, NetPoint * dst, RouteCreationArgs * into, double* latency) = 0;
   /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
   /* returns whether we found a bypass path */
   bool getBypassRoute(routing::NetPoint * src, routing::NetPoint * dst,
-                      /* OUT */ std::vector<surf::LinkImpl*> * links, double* latency);
+                      /* OUT */ std::vector<surf::LinkImpl*>& links, double* latency);
 
 public:
   /* @brief get the route between two nodes in the full platform
@@ -87,7 +87,7 @@ public:
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
   static void getGlobalRoute(routing::NetPoint * src, routing::NetPoint * dst,
-                             /* OUT */ std::vector<surf::LinkImpl*> * links, double* latency);
+                             /* OUT */ std::vector<surf::LinkImpl*>& links, double* latency);
 
   virtual void getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t> * nodes,
                         std::map<std::string, xbt_edge_t> * edges) = 0;