X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/242fde5e8077f8193db4df5f262a9672085c8d8a..ceeab8813fc0aff89562202f64c29a808e84cb9a:/src/surf/surf_routing_dijkstra.hpp diff --git a/src/surf/surf_routing_dijkstra.hpp b/src/surf/surf_routing_dijkstra.hpp index 28143839a6..a5ef07e3ed 100644 --- a/src/surf/surf_routing_dijkstra.hpp +++ b/src/surf/surf_routing_dijkstra.hpp @@ -1,9 +1,11 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-2015. 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 + #include "surf_routing_generic.hpp" #ifndef SURF_ROUTING_DIJKSTRA_HPP_ @@ -23,15 +25,19 @@ typedef struct route_cache_element { int size; } s_route_cache_element_t, *route_cache_element_t; +namespace simgrid { +namespace surf { + /*********** * Classes * ***********/ -class AsDijkstra; + +class XBT_PRIVATE AsDijkstra; class AsDijkstra : public AsGeneric { public: AsDijkstra(); - AsDijkstra(int cached); + AsDijkstra(bool cached); ~AsDijkstra(); xbt_node_t routeGraphNewNode(int id, int graph_id); graph_node_map_element_t nodeMapSearch(int id); @@ -49,17 +55,20 @@ public: * will have a loopback attached to it. */ void addLoopback(); - void getRouteAndLatency(RoutingEdge *src, RoutingEdge *dst, sg_platf_route_cbarg_t route, double *lat); - xbt_dynar_t getOnelinkRoutes(); - void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); - void parseASroute(sg_platf_route_cbarg_t route); - void parseRoute(sg_platf_route_cbarg_t route); + void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat) override; + xbt_dynar_t getOneLinkRoutes() override; + void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); // FIXME: this function is dangerously not overriding because of diverging prototype + void parseASroute(sg_platf_route_cbarg_t route) override; + void parseRoute(sg_platf_route_cbarg_t route) override; void end(); - xbt_graph_t p_routeGraph; /* xbt_graph */ - xbt_dict_t p_graphNodeMap; /* map */ - xbt_dict_t p_routeCache; /* use in cache mode */ - int m_cached; + xbt_graph_t p_routeGraph = nullptr; /* xbt_graph */ + xbt_dict_t p_graphNodeMap = nullptr; /* map */ + xbt_dict_t p_routeCache = nullptr; /* use in cache mode */ + bool m_cached = false; }; +} +} + #endif /* SURF_ROUTING_DIJKSTRA_HPP_ */