X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/283236f8e2414d7c30d46e6d1aea0e8882699dd1..a243b4c3535f516d05259cac06963c422d4aadc0:/src/surf/surf_routing.hpp diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 60c47f21d3..d61d3fa88e 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -1,10 +1,16 @@ #include "surf.hpp" +#include #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 * ***********/ @@ -45,7 +51,7 @@ public: As(){}; ~As(){}; - int test(){return 3;}; + virtual void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency)=0; virtual xbt_dynar_t getOneLinkRoutes()=0; virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0; @@ -75,9 +81,11 @@ public: */ class Onelink { public: + Onelink(void *link, RoutingEdgePtr src, RoutingEdgePtr dst) + : p_link(link), p_src(src), p_dst(dst) {}; RoutingEdgePtr p_src; RoutingEdgePtr p_dst; - void *p_linkPtr; + void *p_link; }; class RoutingPlatf { @@ -86,6 +94,7 @@ public: void *p_loopback; xbt_dynar_t p_lastRoute; xbt_dynar_t getOneLinkRoutes(void); + xbt_dynar_t recursiveGetOneLinkRoutes(AsPtr rc); void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, xbt_dynar_t * links, double *latency); };