Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refactor Host and HostImpl
[simgrid.git] / include / simgrid / s4u / Engine.hpp
index 83df843..9013733 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <simgrid/forward.h>
 
+#include <simgrid/kernel/resource/Model.hpp>
 #include <simgrid/s4u/NetZone.hpp>
 
 #include <string>
@@ -84,6 +85,7 @@ public:
 
 protected:
 #ifndef DOXYGEN
+  friend surf::HostImpl;
   friend Host;
   friend Link;
   friend Disk;
@@ -129,6 +131,18 @@ public:
 
   NetZone* netzone_by_name_or_null(const std::string& name) const;
 
+  /**
+   * @brief Add a model to engine list
+   *
+   * @param model Pointer to model
+   * @param list  List of dependencies for this model (optional)
+   */
+  void add_model(std::shared_ptr<simgrid::kernel::resource::Model> model,
+                 const std::vector<kernel::resource::Model*>& dependencies = {});
+
+  /** @brief Get list of all models managed by this engine */
+  const std::vector<simgrid::kernel::resource::Model*>& get_all_models() const;
+
   /** @brief Retrieves all netzones of the type indicated by the template argument */
   template <class T> std::vector<T*> get_filtered_netzones() const
   {