Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
175a18aa7a679d6ebf5070719f492a4c55b640b1
[simgrid.git] / src / kernel / EngineImpl.cpp
1 /* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "src/kernel/EngineImpl.hpp"
7 #include "src/kernel/routing/NetCard.hpp"
8 #include "src/kernel/routing/NetZoneImpl.hpp"
9 #include <simgrid/s4u/host.hpp>
10
11 xbt_dict_t netcards_dict;
12
13 namespace simgrid {
14 namespace kernel {
15
16 EngineImpl::EngineImpl()
17 {
18   netcards_dict = xbt_dict_new_homogeneous([](void* p) {
19     delete static_cast<simgrid::kernel::routing::NetCard*>(p);
20   });
21 }
22 EngineImpl::~EngineImpl()
23 {
24   delete netRoot_;
25   xbt_dict_free(&netcards_dict);
26 }
27 }
28 }