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
{
/** 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)
{
/** 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
{