s4u::As *Engine::rootAs()
{
- return routing_platf->root_; // FIXME: get the root into the Engine directly (and kill the platf)
- // return pimpl->rootAs_;
+ return pimpl->rootAs_;
}
static s4u::As *asByNameRecursive(s4u::As *current, const char *name)
#include "src/surf/HostImpl.hpp"
#include "surf/surf.h"
+#include "simgrid/s4u/engine.hpp"
+#include "src/kernel/EngineImpl.hpp"
#include "src/simix/smx_private.h"
#include "src/include/simgrid/sg_config.h"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-#include "surf/surf_routing.h" // FIXME: brain dead public header
#include "src/kernel/routing/AsImpl.hpp"
#include "src/kernel/routing/AsCluster.hpp"
}
if (current_routing == nullptr) { /* it is the first one */
- xbt_assert(routing_platf->root_ == nullptr, "All defined components must belong to a AS");
- routing_platf->root_ = new_as;
+ xbt_assert(simgrid::s4u::Engine::instance()->pimpl->rootAs_ == nullptr,
+ "All defined components must belong to a AS");
+ simgrid::s4u::Engine::instance()->pimpl->rootAs_ = new_as;
} else {
/* set the father behavior */
}
simgrid::kernel::routing::RoutingPlatf::RoutingPlatf() = default;
-simgrid::kernel::routing::RoutingPlatf::~RoutingPlatf()
-{
- delete root_;
-}
+simgrid::kernel::routing::RoutingPlatf::~RoutingPlatf() = default;