+ xbt_dynar_free(&sg_platf_host_cb_list);
+ xbt_dynar_free(&sg_platf_router_cb_list);
+ xbt_dynar_free(&sg_platf_link_cb_list);
+ xbt_dynar_free(&sg_platf_postparse_cb_list);
+ xbt_dynar_free(&sg_platf_peer_cb_list);
+ xbt_dynar_free(&sg_platf_cluster_cb_list);
+ xbt_dynar_free(&sg_platf_AS_begin_cb_list);
+ xbt_dynar_free(&sg_platf_AS_end_cb_list);
+
+ /* make sure that we will reinit the models while loading the platf once reinited */
+ surf_parse_models_setup_already_called = 0;
+}
+
+void sg_platf_new_host(sg_platf_host_cbarg_t h){
+ unsigned int iterator;
+ sg_platf_host_cb_t fun;
+ xbt_dynar_foreach(sg_platf_host_cb_list, iterator, fun) {
+ fun(h);
+ }
+}
+void sg_platf_new_router(sg_platf_router_cbarg_t router) {
+ unsigned int iterator;
+ sg_platf_router_cb_t fun;
+ xbt_dynar_foreach(sg_platf_router_cb_list, iterator, fun) {
+ fun(router);
+ }
+}
+void sg_platf_new_link(sg_platf_link_cbarg_t link){
+ unsigned int iterator;
+ sg_platf_link_cb_t fun;
+ xbt_dynar_foreach(sg_platf_link_cb_list, iterator, fun) {
+ fun(link);
+ }
+}
+void sg_platf_new_peer(sg_platf_peer_cbarg_t peer){
+ unsigned int iterator;
+ sg_platf_peer_cb_t fun;
+ xbt_dynar_foreach(sg_platf_peer_cb_list, iterator, fun) {
+ fun(peer);
+ }
+}
+void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster){
+ unsigned int iterator;
+ sg_platf_cluster_cb_t fun;
+ xbt_dynar_foreach(sg_platf_cluster_cb_list, iterator, fun) {
+ fun(cluster);
+ }
+}
+
+void sg_platf_begin() { /* Do nothing: just for symmetry of user code */ }
+
+void sg_platf_end() {
+ unsigned int iterator;
+ void_f_void_t fun;
+ xbt_dynar_foreach(sg_platf_postparse_cb_list, iterator, fun) {
+ fun();
+ }