summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ddabdf5)
+ rework the inheritance tree: models don't need to inherit of AsNone
sg_platf_route_cbarg_t As::getBypassRoute(NetCard * /*src*/, NetCard * /*dst*/, double * /*lat*/) {
return NULL;
}
sg_platf_route_cbarg_t As::getBypassRoute(NetCard * /*src*/, NetCard * /*dst*/, double * /*lat*/) {
return NULL;
}
+ xbt_dynar_t As::getOneLinkRoutes() {
+ return NULL;
+ }
int As::addComponent(NetCard *elm) {
XBT_DEBUG("Load component \"%s\"", elm->name());
int As::addComponent(NetCard *elm) {
XBT_DEBUG("Load component \"%s\"", elm->name());
*/
virtual void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0;
/** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
*/
virtual void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0;
/** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
- virtual xbt_dynar_t getOneLinkRoutes()=0;
+ virtual xbt_dynar_t getOneLinkRoutes();
virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0;
virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0;
namespace simgrid {
namespace surf {
AsCluster::AsCluster(const char*name)
namespace simgrid {
namespace surf {
AsCluster::AsCluster(const char*name)
{}
void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
{}
void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
-#include "surf_routing_none.hpp"
+#include "surf_routing.hpp"
#include "network_interface.hpp"
namespace simgrid {
#include "network_interface.hpp"
namespace simgrid {
/* ************************************************** */
/* ************** Cluster ROUTING **************** */
/* ************************************************** */
/* ************** Cluster ROUTING **************** */
-class AsCluster: public AsNone {
+class AsCluster: public As {
public:
AsCluster(const char*name);
public:
AsCluster(const char*name);
namespace surf {
AsGeneric::AsGeneric(const char*name)
namespace surf {
AsGeneric::AsGeneric(const char*name)
-#include "surf_routing_none.hpp"
+#include "surf_routing.hpp"
#ifndef SURF_ROUTING_GENERIC_HPP_
#define SURF_ROUTING_GENERIC_HPP_
#ifndef SURF_ROUTING_GENERIC_HPP_
#define SURF_ROUTING_GENERIC_HPP_
class XBT_PRIVATE AsGeneric;
class XBT_PRIVATE AsGeneric;
-class XBT_PRIVATE AsGeneric : public AsNone {
+class XBT_PRIVATE AsGeneric : public As {
public:
AsGeneric(const char*name);
~AsGeneric();
public:
AsGeneric(const char*name);
~AsGeneric();
-xbt_dynar_t AsNone::getOneLinkRoutes() {
- return NULL;
-}
-
void AsNone::getRouteAndLatency(NetCard * /*src*/, NetCard * /*dst*/,
sg_platf_route_cbarg_t /*res*/, double */*lat*/)
{}
void AsNone::getRouteAndLatency(NetCard * /*src*/, NetCard * /*dst*/,
sg_platf_route_cbarg_t /*res*/, double */*lat*/)
{}
~AsNone();
void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
~AsNone();
void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
- xbt_dynar_t getOneLinkRoutes() override;
void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
};
void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
};