Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename As::getRouteAndLatency into As::getLocalRoute
[simgrid.git] / src / kernel / routing / AsImpl.hpp
index fa20c43..ce34fdf 100644 (file)
@@ -22,7 +22,8 @@ namespace routing {
   /** @brief Autonomous Systems
    *
    * An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes.
   /** @brief Autonomous Systems
    *
    * An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes.
-   * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).
+   * In SimGrid, there is a hierarchy (a tree) of ASes, with a unique root AS (that you can retrieve from the
+   * s4u::Engine).
    */
   XBT_PUBLIC_CLASS AsImpl : public s4u::As
   {
    */
   XBT_PUBLIC_CLASS AsImpl : public s4u::As
   {
@@ -30,7 +31,6 @@ namespace routing {
 
   protected:
     explicit AsImpl(As * father, const char* name);
 
   protected:
     explicit AsImpl(As * father, const char* name);
-    ~AsImpl() override;
 
   public:
     /** @brief Make an host within that AS */
 
   public:
     /** @brief Make an host within that AS */
@@ -61,17 +61,18 @@ namespace routing {
      * @param into Container into which the traversed links should be pushed
      * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
      */
      * @param into Container into which the traversed links should be pushed
      * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
      */
-    virtual void getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
+  protected:
+    virtual void getLocalRoute(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) */
     /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
-    virtual void getOneLinkRoutes(std::vector<Onelink*> * accumulator);
     /* returns whether we found a bypass path */
     bool getBypassRoute(routing::NetCard * src, routing::NetCard * dst,
                         /* OUT */ std::vector<surf::Link*> * links, double* latency);
 
     /* returns whether we found a bypass path */
     bool getBypassRoute(routing::NetCard * src, routing::NetCard * dst,
                         /* OUT */ std::vector<surf::Link*> * links, double* latency);
 
+  public:
+    virtual void getOneLinkRoutes(std::vector<Onelink*> * accumulator);
     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<surf::Link*> * 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<surf::Link*> * links, double* latency);
-
     enum class RoutingMode {
       unset = 0, /**< Undefined type                                   */
       base,      /**< Base case: use simple link lists for routing     */
     enum class RoutingMode {
       unset = 0, /**< Undefined type                                   */
       base,      /**< Base case: use simple link lists for routing     */