Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / simgrid / module.cpp
index 28647f3..e3095bc 100644 (file)
@@ -6,10 +6,10 @@
 #include <xbt/asserts.h>
 #include <xbt/log.h>
 
-#include "simgrid/sg_config.hpp"
 #include "src/simgrid/module.hpp"
-#include "src/surf/surf_interface.hpp"
+#include "src/simgrid/sg_config.hpp"
 
+#include <algorithm>
 #include <sstream>
 
 XBT_LOG_NEW_CATEGORY(plugin, "Common category for the logging of all plugins");
@@ -43,14 +43,14 @@ void ModuleGroup::create_flag(const std::string& opt_name, const std::string& de
           by_name(value); // Simply ensure that this value exists, it will be picked up later
       });
 }
-void ModuleGroup::init_from_flag_value()
+void ModuleGroup::init_from_flag_value() const
 {
   by_name(simgrid::config::get_value<std::string>(opt_name_)).init();
 }
 
 ModuleGroup& ModuleGroup::add(const char* id, const char* desc, std::function<void()> init)
 {
-  table_.emplace_back(Module(id, desc, init));
+  table_.emplace_back(id, desc, std::move(init));
   return *this;
 }
 
@@ -79,17 +79,3 @@ std::string ModuleGroup::existing_values() const
   }
   return ss.str();
 }
-
-/* -------------------------------------------------------------------------------------------------------------- */
-simgrid::ModuleGroup surf_optimization_mode_description("optimization mode");
-
-void simgrid_create_models()
-{
-  surf_optimization_mode_description
-      .add("Lazy", "Lazy action management (partial invalidation in lmm + heap in action remaining).", nullptr)
-      .add("TI",
-           "Trace integration. Highly optimized mode when using availability traces (only available for the Cas01 CPU "
-           "model for now).",
-           nullptr)
-      .add("Full", "Full update of remaining and variables. Slow but may be useful when debugging.", nullptr);
-}