Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'depencencies' of https://framagit.org/simgrid/simgrid into depencencies
[simgrid.git] / src / kernel / EngineImpl.hpp
1 /* Copyright (c) 2016-2020. 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 <map>
7 #include <simgrid/s4u/NetZone.hpp>
8 #include <simgrid/simix.hpp>
9 #include <string>
10 #include <unordered_map>
11
12 namespace simgrid {
13 namespace kernel {
14
15 class EngineImpl {
16   std::map<std::string, s4u::Host*> hosts_;
17   std::map<std::string, resource::LinkImpl*> links_;
18   std::map<std::string, resource::StorageImpl*> storages_;
19   std::unordered_map<std::string, routing::NetPoint*> netpoints_;
20   friend s4u::Engine;
21
22 public:
23   EngineImpl() = default;
24
25   EngineImpl(const EngineImpl&) = delete;
26   EngineImpl& operator=(const EngineImpl&) = delete;
27   virtual ~EngineImpl();
28
29   void load_deployment(const std::string& file);
30   void register_function(const std::string& name, xbt_main_func_t code);
31   void register_function(const std::string& name, void (*code)(std::vector<std::string>));
32   void register_default(xbt_main_func_t code);
33
34   routing::NetZoneImpl* netzone_root_ = nullptr;
35 };
36
37 } // namespace kernel
38 } // namespace simgrid