#include <simgrid/kernel/routing/RoutedZone.hpp>
-
namespace simgrid {
namespace kernel {
namespace routing {
*/
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) override;
void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
};
} // namespace routing
} // namespace kernel
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
};
} // namespace routing
} // namespace kernel
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
private:
std::vector<RouteCreationArgs*> routing_table_;
virtual int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
+ const std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
/** @brief Set parent of this Netzone */
void set_parent(NetZoneImpl* parent);
/** @brief Set network model for this Netzone */
const std::vector<Link*>& link_list, bool symmetrical = true);
void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
- kernel::routing::NetPoint* gw_dst, std::vector<kernel::resource::LinkImpl*>& link_list,
+ kernel::routing::NetPoint* gw_dst, const std::vector<kernel::resource::LinkImpl*>& link_list,
bool symmetrical);
void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
}
void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
}
void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
/* set the size of table routing */
unsigned int table_size = get_table_size();
}
void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+ const std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
}
void NetZoneImpl::add_route(NetPoint* /*src*/, NetPoint* /*dst*/, NetPoint* /*gw_src*/, NetPoint* /*gw_dst*/,
- std::vector<resource::LinkImpl*>& /*link_list*/, bool /*symmetrical*/)
+ const std::vector<resource::LinkImpl*>& /*link_list*/, bool /*symmetrical*/)
{
xbt_die("NetZone '%s' does not accept new routes (wrong class).", get_cname());
}
void NetZone::add_regular_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
const std::vector<Link*>& link_list, bool symmetrical)
{
- auto links = NetZone::get_link_list_impl(link_list);
- add_route(src, dst, nullptr, nullptr, links, symmetrical);
+ add_route(src, dst, nullptr, nullptr, NetZone::get_link_list_impl(link_list), symmetrical);
}
void NetZone::add_netzone_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
const std::vector<Link*>& link_list, bool symmetrical)
{
- auto links = NetZone::get_link_list_impl(link_list);
- add_route(src, dst, gw_src, gw_dst, links, symmetrical);
+ add_route(src, dst, gw_src, gw_dst, NetZone::get_link_list_impl(link_list), symmetrical);
}
void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical)
+ const std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical)
{
pimpl_->add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
}