X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/831de10adaaf8910940aa280e2ac2dd075b5ffe5..e860b114232c4593c6e99e2c35ee4b9b7d7ef629:/src/kernel/routing/AsImpl.hpp diff --git a/src/kernel/routing/AsImpl.hpp b/src/kernel/routing/AsImpl.hpp index 5e64ccd092..700f067e09 100644 --- a/src/kernel/routing/AsImpl.hpp +++ b/src/kernel/routing/AsImpl.hpp @@ -14,6 +14,7 @@ #include "src/surf/xml/platf_private.hpp" // FIXME: kill sg_platf_route_cbarg_t to remove that UGLY include namespace simgrid { +namespace kernel { namespace routing { class RoutingPlatf; // FIXME: KILLME @@ -23,12 +24,15 @@ namespace routing { * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine). */ XBT_PUBLIC_CLASS AsImpl : public s4u::As { - friend simgrid::routing::RoutingPlatf; + friend simgrid::kernel::routing::RoutingPlatf; protected: - explicit AsImpl(const char *name); + explicit AsImpl(As * father, const char* name); ~AsImpl() override; public: + /** @brief attach the given host to that AS */ + void attachHost(s4u::Host * host); + /** * @brief Probe the routing path between two points * @@ -56,11 +60,13 @@ public: virtual void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0; /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */ virtual xbt_dynar_t getOneLinkRoutes(); - std::vector *getBypassRoute(routing::NetCard *src, routing::NetCard *dst); + /* returns whether we found a bypass path */ + bool getBypassRoute(routing::NetCard * src, routing::NetCard * dst, + /* OUT */ std::vector * links, double* latency); virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0; - static void getRouteRecursive(routing::NetCard *src, routing::NetCard *dst, /* OUT */ std::vector * links, double *latency); - + static void getRouteRecursive(routing::NetCard * src, routing::NetCard * dst, + /* OUT */ std::vector * links, double* latency); enum class RoutingMode { unset = 0, /**< Undefined type */ @@ -72,6 +78,6 @@ public: routing::NetCard *netcard_ = nullptr; // Our representative in the father AS }; -}}; // Namespace simgrid::s4u +}}}; // Namespace simgrid::kernel::routing #endif /* SIMGRID_SURF_AS_HPP */