Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sanitize type naming between surf models and routing models
[simgrid.git] / src / surf / surf_routing_full.c
index 2e81d23..ca3a73a 100644 (file)
@@ -9,7 +9,7 @@
 /* Global vars */
 extern routing_global_t global_routing;
 extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
+extern routing_model_description_t current_routing_model;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 
@@ -126,25 +126,16 @@ static void full_finalize(routing_component_t rc)
 
 routing_component_t model_full_create(void)
 {
-  routing_component_full_t new_component =
-      xbt_new0(s_routing_component_full_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      generic_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      generic_set_autonomous_system;
-  new_component->generic_routing.set_route = model_full_set_route;
-  new_component->generic_routing.set_ASroute = model_full_set_route;
-  new_component->generic_routing.set_bypassroute = generic_set_bypassroute;
+  routing_component_full_t new_component = (routing_component_full_t)
+      routmod_generic_create(sizeof(s_routing_component_full_t));
+
+  new_component->generic_routing.parse_route = model_full_set_route;
+  new_component->generic_routing.parse_ASroute = model_full_set_route;
   new_component->generic_routing.get_route = full_get_route;
-  new_component->generic_routing.get_latency = generic_get_link_latency;
   new_component->generic_routing.get_onelink_routes =
       full_get_onelink_routes;
-  new_component->generic_routing.get_bypass_route =
-      generic_get_bypassroute;
   new_component->generic_routing.finalize = full_finalize;
-  new_component->generic_routing.to_index = xbt_dict_new();
-  new_component->generic_routing.bypassRoutes = xbt_dict_new();
-  new_component->generic_routing.get_network_element_type = get_network_element_type;
+
   return (routing_component_t) new_component;
 }
 
@@ -180,6 +171,10 @@ void model_full_end(void)
   }
 }
 
+static int surf_pointer_resource_cmp(const void *a, const void *b) {
+  return a != b;
+}
+
 void model_full_set_route(routing_component_t rc, const char *src,
                const char *dst, name_route_extended_t route)
 {