Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move all netcards into the dict, and the dict to the engine
[simgrid.git] / src / kernel / EngineImpl.cpp
index 552b4b0..175a18a 100644 (file)
@@ -4,18 +4,25 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/EngineImpl.hpp"
-#include "src/kernel/routing/AsImpl.hpp"
+#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetZoneImpl.hpp"
 #include <simgrid/s4u/host.hpp>
 
+xbt_dict_t netcards_dict;
+
 namespace simgrid {
 namespace kernel {
 
 EngineImpl::EngineImpl()
 {
+  netcards_dict = xbt_dict_new_homogeneous([](void* p) {
+    delete static_cast<simgrid::kernel::routing::NetCard*>(p);
+  });
 }
 EngineImpl::~EngineImpl()
 {
-  delete rootAs_;
+  delete netRoot_;
+  xbt_dict_free(&netcards_dict);
 }
 }
 }