#include "src/surf/surf_routing_full.hpp"
#include "src/surf/surf_routing_vivaldi.hpp"
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
namespace simgrid {
namespace surf {
delete netcard_;
}
+ int As::addComponent(NetCard *elm) {
+ XBT_DEBUG("Load component \"%s\"", elm->getName());
+ xbt_dynar_push_as(p_indexNetworkElm, NetCard*, elm);
+ return xbt_dynar_length(p_indexNetworkElm)-1;
+ }
+
}} // namespace simgrid::surf
/**
/* Global vars */
simgrid::surf::RoutingPlatf *routing_platf = NULL;
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
/** The current AS in the parsing */
static simgrid::surf::As *current_routing = NULL;
xbt_dict_set(current_routing->sons_, AS->id,
(void *) new_as, NULL);
/* add to the father element list */
- netcard->setId(current_routing->parseAS(netcard));
+ netcard->setId(current_routing->addComponent(netcard));
} else {
THROWF(arg_error, 0, "All defined components must belong to a AS");
}