X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c19a107a096f503e67217fb178fa98eb742ceb4d..89f389e6348fde6457d692ef1f0a81d55f658b1d:/src/s4u/s4u_Engine.cpp diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index c140382196..054c00e138 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -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 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& Engine::get_model_list(simgrid::kernel::resource::Model::Type type) +{ + return pimpl->get_model_list(type); +} + +const std::vector>& 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& 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 {