/* Prototypes of the functions that handle the properties */
XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */
-XBT_PUBLIC_DATA(void) parse_properties(const char* prop_id, const char* prop_value);
-XBT_PUBLIC_DATA(void) parse_properties_XML(void);
+XBT_PUBLIC(void) parse_properties(void);
/* surf parse file related (public because called from a test suite) */
XBT_PUBLIC(void) parse_platform_file(const char *file);
surfxml_add_callback(STag_surfxml_process_cb_list, parse_process_init);
surfxml_add_callback(ETag_surfxml_argument_cb_list, parse_argument);
- surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties_XML);
+ surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties);
surfxml_add_callback(ETag_surfxml_process_cb_list,
parse_process_finalize);
/* Prop tag functions */
-void parse_properties(const char* prop_id, const char* prop_value)
-{
- if (!current_property_set)
- current_property_set = xbt_dict_new(); // Maybe, it should raise an error
- xbt_dict_set(current_property_set, prop_id, xbt_strdup(prop_value), free);
-}
-
/**
* With XML parser
*/
-void parse_properties_XML(void)
+void parse_properties(void)
{
- parse_properties(A_surfxml_prop_id, A_surfxml_prop_value);
+ if (!current_property_set)
+ current_property_set = xbt_dict_new(); // Maybe, it should raise an error
+
+ xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), free);
}
surf_parse_reset_callbacks();
/* Register classical callbacks */
- surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties_XML);
+ surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
routing_register_callbacks();
/* init the flex parser */