-/* Copyright (c) 2009-2011, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_routing_cluster.hpp"
+#include "surf_routing_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf");
AS_t model_cluster_create(void)
{
- return new AsCluster();
+ return new simgrid::surf::AsCluster();
}
+namespace simgrid {
+namespace surf {
+
/* Creation routing model functions */
AsCluster::AsCluster() : AsNone()
{
}
if (p_backbone) {
- xbt_dynar_push_as(route->link_list, void *, static_cast<Resource*>(p_backbone));
+ xbt_dynar_push_as(route->link_list, void *,
+ static_cast<simgrid::surf::Resource*>(p_backbone));
if (lat)
*lat += p_backbone->getLatency();
}
if (info.link_up) { // link up
- const char *link_name = static_cast<Resource*>(info.link_up)->getName();
+ const char *link_name = static_cast<simgrid::surf::Resource*>(
+ info.link_up)->getName();
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
}
if (info.link_down) { // link down
- const char *link_name = static_cast<Resource*>(info.link_down)->getName();
+ const char *link_name = static_cast<simgrid::surf::Resource*>(
+ info.link_down)->getName();
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
}
void AsCluster::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int , int position){
- s_sg_platf_link_cbarg_t link;
+ s_sg_platf_link_cbarg_t link = SG_PLATF_LINK_INITIALIZER;
s_surf_parsing_link_up_down_t info;
char* link_id = bprintf("%s_link_%d", cluster->id, id);
return xbt_dynar_length(p_indexNetworkElm)-1;
}
+}
+}