From: Martin Quinson Date: Mon, 29 Feb 2016 11:34:57 +0000 (+0100) Subject: rename some fields (ignorable) X-Git-Tag: v3_13~625^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/36ed9bb3db4df8293627b73fc83b6250b1026af1 rename some fields (ignorable) --- diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 4605e692f3..771db26cc2 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -779,7 +779,7 @@ XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib; XBT_PUBLIC_DATA(AS_t) surf_AS_get_routing_root(void); XBT_PUBLIC_DATA(const char *) surf_AS_get_name(AS_t as); XBT_PUBLIC_DATA(AS_t) surf_AS_get_by_name(const char * name); -XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_routing_sons(AS_t as); +XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_children(AS_t as); XBT_PUBLIC_DATA(xbt_dynar_t) surf_AS_get_hosts(AS_t as); XBT_PUBLIC_DATA(void) surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges); diff --git a/src/instr/jedule/jedule_sd_binding.cpp b/src/instr/jedule/jedule_sd_binding.cpp index d780d3c3d8..e2a09f49ed 100644 --- a/src/instr/jedule/jedule_sd_binding.cpp +++ b/src/instr/jedule/jedule_sd_binding.cpp @@ -58,7 +58,7 @@ static void create_hierarchy(AS_t current_comp, xbt_dict_cursor_t cursor = NULL; char *key; AS_t elem; - xbt_dict_t routing_sons = surf_AS_get_routing_sons(current_comp); + xbt_dict_t routing_sons = surf_AS_get_children(current_comp); if (xbt_dict_is_empty(routing_sons)) { // I am no AS diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index d07025343e..067eb5f9c2 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -60,7 +60,7 @@ msg_as_t MSG_environment_as_get_by_name(const char * name) { } xbt_dict_t MSG_environment_as_get_routing_sons(msg_as_t as) { - xbt_dict_t res = surf_AS_get_routing_sons(as); + xbt_dict_t res = surf_AS_get_children(as); return res; } diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index fc53997091..d53c5d2f09 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -130,12 +130,12 @@ static void recursiveGraphExtraction (simgrid::surf::As *rc, container_t contain return; } XBT_DEBUG ("Graph extraction for routing_component = %s", rc->name_); - if (!xbt_dict_is_empty(rc->sons_)){ + if (!xbt_dict_is_empty(rc->children_)){ xbt_dict_cursor_t cursor = NULL; AS_t rc_son; char *child_name; //bottom-up recursion - xbt_dict_foreach(surf_AS_get_routing_sons(rc), cursor, child_name, rc_son) { + xbt_dict_foreach(surf_AS_get_children(rc), cursor, child_name, rc_son) { container_t child_container = (container_t) xbt_dict_get ( container->children, surf_AS_get_name(rc_son)); recursiveGraphExtraction (rc_son, child_container, filter); @@ -446,12 +446,12 @@ int instr_platform_traced () static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, AS_t rc, container_t container) { - if (!xbt_dict_is_empty(surf_AS_get_routing_sons(rc))){ + if (!xbt_dict_is_empty(surf_AS_get_children(rc))){ xbt_dict_cursor_t cursor = NULL; AS_t rc_son; char *child_name; //bottom-up recursion - xbt_dict_foreach(surf_AS_get_routing_sons(rc), cursor, child_name, rc_son) { + xbt_dict_foreach(surf_AS_get_children(rc), cursor, child_name, rc_son) { container_t child_container = (container_t) xbt_dict_get ( container->children, surf_AS_get_name(rc_son)); recursiveXBTGraphExtraction (graph, nodes, edges, rc_son, child_container); diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index ad80f33334..9b64a4ec83 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -37,12 +37,12 @@ namespace surf { xbt_dict_cursor_t cursor = NULL; char *key; AS_t elem; - xbt_dict_foreach(sons_, cursor, key, elem) { + xbt_dict_foreach(children_, cursor, key, elem) { delete (As*)elem; } - xbt_dict_free(&sons_); + xbt_dict_free(&children_); xbt_dynar_free(&vertices_); xbt_dynar_free(&upDownLinks); for (auto &kv : bypassRoutes_) @@ -336,7 +336,7 @@ void routing_AS_begin(sg_platf_AS_cbarg_t AS) netcard->setId(-1); } else if (current_routing != NULL && routing_platf->root_ != NULL) { - xbt_assert(!xbt_dict_get_or_null(current_routing->sons_, AS->id), + xbt_assert(!xbt_dict_get_or_null(current_routing->children_, AS->id), "The AS \"%s\" already exists", AS->id); /* it is a part of the tree */ new_as->father_ = current_routing; @@ -344,7 +344,7 @@ void routing_AS_begin(sg_platf_AS_cbarg_t AS) if (current_routing->hierarchy_ == SURF_ROUTING_NULL) current_routing->hierarchy_ = SURF_ROUTING_RECURSIVE; /* add to the sons dictionary */ - xbt_dict_set(current_routing->sons_, AS->id, (void *) new_as, NULL); + xbt_dict_set(current_routing->children_, AS->id, (void *) new_as, NULL); /* add to the father element list */ netcard->setId(current_routing->addComponent(netcard)); } else { @@ -534,7 +534,7 @@ static xbt_dynar_t _recursiveGetOneLinkRoutes(As *rc) char *key; xbt_dict_cursor_t cursor = NULL; AS_t rc_child; - xbt_dict_foreach(rc->sons_, cursor, key, rc_child) { + xbt_dict_foreach(rc->children_, cursor, key, rc_child) { xbt_dynar_t onelink_child = _recursiveGetOneLinkRoutes(rc_child); if (onelink_child) xbt_dynar_merge(&ret,&onelink_child); @@ -780,7 +780,7 @@ static simgrid::surf::As *surf_AS_recursive_get_by_name(simgrid::surf::As *curre if(!strcmp(current->name_, name)) return current; - xbt_dict_foreach(current->sons_, cursor, key, elem) { + xbt_dict_foreach(current->children_, cursor, key, elem) { tmp = surf_AS_recursive_get_by_name(elem, name); if(tmp != NULL ) { break; @@ -797,9 +797,9 @@ simgrid::surf::As *surf_AS_get_by_name(const char * name) return as; } -xbt_dict_t surf_AS_get_routing_sons(simgrid::surf::As *as) +xbt_dict_t surf_AS_get_children(simgrid::surf::As *as) { - return as->sons_; + return as->children_; } xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as) diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index dd4ef9d62f..bd09517659 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -68,7 +68,7 @@ public: char *name_ = nullptr; NetCard *netcard_ = nullptr; // Our representative in the father AS As *father_ = nullptr; - xbt_dict_t sons_ = xbt_dict_new_homogeneous(NULL); // sub-ASes + xbt_dict_t children_ = xbt_dict_new_homogeneous(NULL); // sub-ASes xbt_dynar_t vertices_ = xbt_dynar_new(sizeof(char*),NULL); // our content, as known to our graph routing algorithm (maps vertexId -> vertex) private: