Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
routing: move an empty implementation to the super class
[simgrid.git] / src / surf / surf_routing.cpp
index 237c4ed..fbc8c5c 100644 (file)
@@ -36,17 +36,32 @@ namespace surf {
   As::~As()
   {
     xbt_dict_free(&sons_);
-    xbt_dynar_free(&p_indexNetworkElm);
+    xbt_dynar_free(&vertices_);
     xbt_dynar_free(&upDownLinks);
     xbt_free(name_);
     if (netcard_)
       delete netcard_;
   }
 
+  sg_platf_route_cbarg_t As::getBypassRoute(NetCard * /*src*/, NetCard * /*dst*/, double * /*lat*/) {
+    return NULL;
+  }
+
+
   int As::addComponent(NetCard *elm) {
     XBT_DEBUG("Load component \"%s\"", elm->getName());
-    xbt_dynar_push_as(p_indexNetworkElm, NetCard*, elm);
-    return xbt_dynar_length(p_indexNetworkElm)-1;
+    xbt_dynar_push_as(vertices_, NetCard*, elm);
+    return xbt_dynar_length(vertices_)-1;
+  }
+
+  void As::parseRoute(sg_platf_route_cbarg_t /*route*/){
+    THROW_IMPOSSIBLE; /* No. */
+  }
+  void As::parseASroute(sg_platf_route_cbarg_t /*route*/){
+    THROW_IMPOSSIBLE;
+  }
+  void As::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
+    THROW_IMPOSSIBLE;
   }
 
 }} // namespace simgrid::surf
@@ -856,7 +871,7 @@ xbt_dict_t surf_AS_get_routing_sons(simgrid::surf::As *as)
 
 xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as)
 {
-  xbt_dynar_t elms = as->p_indexNetworkElm;
+  xbt_dynar_t elms = as->vertices_;
   int count = xbt_dynar_length(elms);
   xbt_dynar_t res =  xbt_dynar_new(sizeof(sg_host_t), NULL);
   for (int index = 0; index < count; index++) {