#include "xbt/config.h"
#include "xbt/graph.h"
#include "xbt/set.h"
+#include "surf/surfxml_parse.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
#endif
}
-void surf_config_add_callback(void)
+void surf_parse_add_callback_config(void)
{
- surf_parse_reset_parser();
surfxml_add_callback(STag_surfxml_config_cb_list, &routing_parse_Sconfig);
surfxml_add_callback(ETag_surfxml_config_cb_list, &routing_parse_Econfig);
surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
+ surfxml_add_callback(STag_surfxml_AS_cb_list, &surf_parse_models_setup);
+}
+
+void surf_parse_models_setup()
+{
+ surfxml_del_callback(STag_surfxml_AS_cb_list, surf_parse_models_setup);
+ surf_config_models_setup(platform_filename);
+ free(platform_filename);
}
/* ************************************************************************** */
static void routing_parse_Econfig(void)
{
xbt_dict_cursor_t cursor = NULL;
- xbt_cfgelm_t variable;
char *key;
char *elem;
char *cfg;
xbt_dict_foreach(current_property_set, cursor, key, elem) {
cfg = bprintf("%s:%s",key,elem);
- variable = xbt_cfgelm_get(_surf_cfg_set, key, xbt_cfgelm_any);
- if(variable->isdefault)
+ if(xbt_cfg_is_default_value(_surf_cfg_set, key))
xbt_cfg_set_parse(_surf_cfg_set, cfg);
else
INFO1("The custom configuration '%s' is already define by user!",key);