X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a7430c3a3c007a1746ac3d8ff320058a66e70b64..0a3d07aa08b06d0d82481ceabb1ba4ccac5de3e3:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index aee71a9f7b..28eb7f8256 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -88,6 +88,8 @@ xbt_dynar_t STag_surfxml_bypassRoute_cb_list = NULL; xbt_dynar_t ETag_surfxml_bypassRoute_cb_list = NULL; xbt_dynar_t STag_surfxml_include_cb_list = NULL; xbt_dynar_t ETag_surfxml_include_cb_list = NULL; +xbt_dynar_t STag_surfxml_storage_cb_list = NULL; +xbt_dynar_t ETag_surfxml_storage_cb_list = NULL; /* The default current property receiver. Setup in the corresponding opening callbacks. */ xbt_dict_t current_property_set = NULL; @@ -103,6 +105,27 @@ FILE *surf_file_to_parse = NULL; static void init_randomness(void); static void add_randomness(void); +/* + * Stuff relative to the tag + */ +void STag_surfxml_storage(void) +{ + XBT_DEBUG("STag_surfxml_storage"); +} +void ETag_surfxml_storage(void) +{ + s_sg_platf_storage_cbarg_t storage; + memset(&storage,0,sizeof(storage)); + + storage.id = A_surfxml_storage_id; + storage.type = A_surfxml_storage_type; + storage.properties = current_property_set; + storage.content = A_surfxml_storage_content; + current_property_set = NULL; + + sg_platf_new_storage(&storage); +} + /* * Stuff relative to the tag */ @@ -210,6 +233,10 @@ void surf_parse_init_callbacks(void) xbt_dynar_new(sizeof(void_f_void_t), NULL); ETag_surfxml_include_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL); + STag_surfxml_storage_cb_list = + xbt_dynar_new(sizeof(void_f_void_t), NULL); + ETag_surfxml_storage_cb_list = + xbt_dynar_new(sizeof(void_f_void_t), NULL); } void surf_parse_reset_callbacks(void) @@ -246,6 +273,8 @@ void surf_parse_free_callbacks(void) xbt_dynar_free(&ETag_surfxml_peer_cb_list); xbt_dynar_free(&STag_surfxml_include_cb_list); xbt_dynar_free(&ETag_surfxml_include_cb_list); + xbt_dynar_free(&STag_surfxml_storage_cb_list); + xbt_dynar_free(&ETag_surfxml_storage_cb_list); } /* Stag and Etag parse functions */ @@ -497,16 +526,16 @@ void STag_surfxml_random(void){ #define parse_method(type,name) \ void type##Tag_surfxml_##name(void) \ { surfxml_call_cb_functions(type##Tag_surfxml_##name##_cb_list); } -parse_method(E, route); -parse_method(E, link_ctn); -parse_method(E, process); -parse_method(E, argument); -parse_method(E, prop); -parse_method(E, trace); -parse_method(E, trace_connect); -parse_method(E, random); -parse_method(E, ASroute); -parse_method(E, bypassRoute); +parse_method(E, route) +parse_method(E, link_ctn) +parse_method(E, process) +parse_method(E, argument) +parse_method(E, prop) +parse_method(E, trace) +parse_method(E, trace_connect) +parse_method(E, random) +parse_method(E, ASroute) +parse_method(E, bypassRoute) /* Open and Close parse file */