Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix initialization order.
[simgrid.git] / src / surf / surf_routing.hpp
index 2e5e36b..6f7a568 100644 (file)
@@ -1,10 +1,16 @@
 #include "surf.hpp"
+#include <float.h>
 
 #ifndef NETWORK_ROUTING_HPP_
 #define NETWORK_ROUTING_HPP_
 
 void routing_model_create( void *loopback);
 
+/* ************************************************************************** */
+/* ************************* GRAPH EXPORTING FUNCTIONS ********************** */
+xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes);
+xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges);
+
 /***********
  * Classes *
  ***********/
@@ -44,7 +50,7 @@ public:
   xbt_dynar_t p_linkUpDownList;
 
   As(){};
-  ~As(){};
+  virtual ~As(){};
 
   virtual void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency)=0;
   virtual xbt_dynar_t getOneLinkRoutes()=0;
@@ -75,9 +81,11 @@ public:
  */
 class Onelink {
 public:
+  Onelink(void *link, RoutingEdgePtr src, RoutingEdgePtr dst)
+    : p_src(src), p_dst(dst), p_link(link) {};
   RoutingEdgePtr p_src;
   RoutingEdgePtr p_dst;
-  void *p_linkPtr;
+  void *p_link;
 };
 
 class RoutingPlatf {