Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modernize simcall sem_acquire_timeout.
[simgrid.git] / src / s4u / s4u_Engine.cpp
index c14038219630b4712e9eaef148fbb019d0015ca1..054c00e138474e619b97c1d1d37ecc11f4376cfa 100644 (file)
@@ -73,12 +73,29 @@ double Engine::get_clock()
   return SIMIX_get_clock();
 }
 
+void Engine::add_model(simgrid::kernel::resource::Model::Type type,
+                       std::shared_ptr<simgrid::kernel::resource::Model> model)
+{
+  simgrid::kernel::actor::simcall([this, type, &model] { pimpl->add_model(type, std::move(model)); });
+}
+
+/** @brief Get list of models created for a resource type */
+const std::vector<simgrid::kernel::resource::Model*>& Engine::get_model_list(simgrid::kernel::resource::Model::Type type)
+{
+  return pimpl->get_model_list(type);
+}
+
+const std::vector<std::shared_ptr<simgrid::kernel::resource::Model>>& Engine::get_all_models() const
+{
+  return pimpl->get_all_models();
+}
+
 /**
  * Creates a new platform, including hosts, links, and the routing table.
  *
- * \rst
+ * @beginrst
  * See also: :ref:`platform`.
- * \endrst
+ * @endrst
  */
 void Engine::load_platform(const std::string& platf) const
 {
@@ -121,7 +138,7 @@ void Engine::register_function(const std::string& name, const std::function<void
 /** Registers a function as the default main function of actors
  *
  * It will be used as fallback when the function requested from the deployment file was not registered.
- * It is used for trace-based simulations (see examples/s4u/replay-comms and similar).
+ * It is used for trace-based simulations (see examples/cpp/replay-comms and similar).
  */
 void Engine::register_default(const std::function<void(int, char**)>& code)
 {
@@ -139,9 +156,9 @@ void Engine::register_function(const std::string& name, const kernel::actor::Act
 
 /** Load a deployment file and launch the actors that it contains
  *
- * \rst
+ * @beginrst
  * See also: :ref:`deploy`.
- * \endrst
+ * @endrst
  */
 void Engine::load_deployment(const std::string& deploy) const
 {