-/* Copyright (c) 2006-2013. The SimGrid Team.
+/* Copyright (c) 2006-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* The default current property receiver. Setup in the corresponding opening callbacks. */
xbt_dict_t current_property_set = NULL;
+xbt_dict_t current_model_property_set = NULL;
xbt_dict_t as_current_property_set = NULL;
int AS_TAG = 0;
char* as_name_tab[1024];
storage.content = A_surfxml_storage_content;
storage.content_type = A_surfxml_storage_content___type;
storage.properties = current_property_set;
+ storage.attach = A_surfxml_storage_attach;
sg_platf_new_storage(&storage);
current_property_set = NULL;
}
AS_TAG = 0;
XBT_DEBUG("STag_surfxml_storage___type");
xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
+ xbt_assert(current_model_property_set == NULL, "Someone forgot to reset the model property set to NULL in its closing tag (or XML malformed)");
}
void ETag_surfxml_storage___type(void)
{
storage_type.id = A_surfxml_storage___type_id;
storage_type.model = A_surfxml_storage___type_model;
storage_type.properties = current_property_set;
+ storage_type.model_properties = current_model_property_set;
storage_type.size = surf_parse_get_size(A_surfxml_storage___type_size);
sg_platf_new_storage_type(&storage_type);
current_property_set = NULL;
+ current_model_property_set = NULL;
}
void STag_surfxml_mstorage(void)
{
ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___src);
ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___dst);
+ if (A_surfxml_ASroute_gw___src && !ASroute.gw_src)
+ surf_parse_error("gw_src=\"%s\" not found for ASroute from \"%s\" to \"%s\"",
+ A_surfxml_ASroute_gw___src, ASroute.src, ASroute.dst);
+ if (A_surfxml_ASroute_gw___dst && !ASroute.gw_dst)
+ surf_parse_error("gw_dst=\"%s\" not found for ASroute from \"%s\" to \"%s\"",
+ A_surfxml_ASroute_gw___dst, ASroute.src, ASroute.dst);
+
ASroute.link_list = parsed_link_list;
switch (A_surfxml_ASroute_symmetrical) {
argv[(argc) - 1] = xbt_strdup(A_surfxml_argument_value);
}
+void STag_surfxml_model___prop(void){
+ if (!current_model_property_set)
+ current_model_property_set = xbt_dict_new_homogeneous(xbt_free_f);
+
+ xbt_dict_set(current_model_property_set, A_surfxml_model___prop_id, xbt_strdup(A_surfxml_model___prop_value), NULL);
+}
+
/* ***************************************** */
/* TUTORIAL: New TAG */
void STag_surfxml_gpu(void)
void STag_surfxml_backbone(void){}
void ETag_surfxml_link___ctn(void){}
void ETag_surfxml_argument(void){}
+void ETag_surfxml_model___prop(void){}
/* Open and Close parse file */