Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / surf / surf_routing.hpp
index 0ac0fa365c4f76c02ce9623df2ce5cd78a8943ff..c64d677cb2b481e0c03907c7d7fd30cdcd3fb75d 100644 (file)
@@ -18,7 +18,7 @@
 #include <map>
 
 SG_BEGIN_DECL()
-XBT_PUBLIC(void) routing_model_create( void *loopback);
+XBT_PUBLIC(void) routing_model_create(Link *loopback);
 XBT_PRIVATE xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes);
 XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges);
 SG_END_DECL()
@@ -140,7 +140,7 @@ private:
 };
 
 /** @ingroup SURF_routing_interface
- * @brief Link of lenght 1, alongside with its source and destination. This is mainly usefull in the ns3 bindings
+ * @brief Link of length 1, alongside with its source and destination. This is mainly useful in the ns3 bindings
  */
 class Onelink {
 public:
@@ -156,13 +156,12 @@ public:
  */
 XBT_PUBLIC_CLASS RoutingPlatf {
 public:
-  RoutingPlatf(void *loopback);
+  RoutingPlatf(Link *loopback);
   ~RoutingPlatf();
   As *root_ = nullptr;
-  void *loopback_;
-  xbt_dynar_t lastRoute_ = xbt_dynar_new(sizeof(Link*),NULL);
+  Link *loopback_;
   xbt_dynar_t getOneLinkRoutes(void);
-  void getRouteAndLatency(NetCard *src, NetCard *dst, xbt_dynar_t * links, double *latency);
+  void getRouteAndLatency(NetCard *src, NetCard *dst, std::vector<Link*> * links, double *latency);
 };
 
 /*************