X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/595e59c568ff5f8510de201bfd800951cdc2adcb..a784ea0b57101613a92e9fe1403d224e7ea4d501:/src/instr/jedule/jedule_platform.cpp diff --git a/src/instr/jedule/jedule_platform.cpp b/src/instr/jedule/jedule_platform.cpp index 1bc42afffe..5109fd7dc5 100644 --- a/src/instr/jedule/jedule_platform.cpp +++ b/src/instr/jedule/jedule_platform.cpp @@ -26,7 +26,7 @@ Container::Container(std::string name): name(name) Container::~Container() { - if(!this->children.empty()) + if (not this->children.empty()) for (auto child: this->children) delete child; } @@ -59,15 +59,15 @@ void Container::addResources(std::vector hosts) void Container::createHierarchy(sg_netzone_t from_as) { - if (from_as->children()->empty()) { + if (from_as->getChildren()->empty()) { // I am no AS // add hosts to jedule platform std::vector table; - from_as->hosts(&table); + from_as->getHosts(&table); this->addResources(table); } else { - for (auto nz : *from_as->children()) { - jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->name())); + for (auto nz : *from_as->getChildren()) { + jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->getCname())); this->addChild(child_container); child_container->createHierarchy(nz); } @@ -80,7 +80,7 @@ std::vector Container::getHierarchy() if(this->parent != nullptr ) { - if(!this->parent->children.empty()) { + if (not this->parent->children.empty()) { // we are in the last level return this->parent->getHierarchy(); } else { @@ -128,7 +128,7 @@ std::string Container::getHierarchyAsString() void Container::printResources(FILE * jed_file) { unsigned int i=0; - xbt_assert(!this->resource_list.empty()); + xbt_assert(not this->resource_list.empty()); unsigned int res_nb = this->resource_list.size(); std::string resid = this->getHierarchyAsString(); @@ -149,7 +149,7 @@ void Container::print(FILE* jed_file) { xbt_assert( this != nullptr ); fprintf(jed_file, " \n", this->name.c_str()); - if( !this->children.empty()){ + if (not this->children.empty()) { for (auto child: this->children) { child->print(jed_file); }