-/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
return;
if (value == "help") {
- model_help("plugin", *surf_plugin_description);
+ model_help("plugin", surf_plugin_description());
exit(0);
}
- int plugin_id = find_model_description(*surf_plugin_description, value);
- (*surf_plugin_description)[plugin_id].model_init_preparse();
+ const auto* plugin = find_model_description(surf_plugin_description(), value);
+ plugin->model_init_preparse();
}
/* callback of the host/model variable */
find_model_description(surf_disk_model_description, value);
}
-/* callback of the cpu/model variable */
-static void _sg_cfg_cb__storage_model(const std::string& value)
-{
- xbt_assert(_sg_cfg_init_status < 2, "Cannot change the model after the initialization");
-
- if (value == "help") {
- model_help("storage", surf_storage_model_description);
- exit(0);
- }
-
- find_model_description(surf_storage_model_description, value);
-}
-
/* callback of the network_model variable */
static void _sg_cfg_cb__network_model(const std::string& value)
{
}
/* Plugins configuration */
- declare_model_flag("plugin", "", &_sg_cfg_cb__plugin, *surf_plugin_description, "plugin", "The plugins");
+ declare_model_flag("plugin", "", &_sg_cfg_cb__plugin, surf_plugin_description(), "plugin", "The plugins");
declare_model_flag("cpu/model", "Cas01", &_sg_cfg_cb__cpu_model, surf_cpu_model_description, "model",
"The model to use for the CPU");
declare_model_flag("disk/model", "default", &_sg_cfg_cb__disk_model, surf_disk_model_description, "model",
"The model to use for the disk");
- declare_model_flag("storage/model", "default", &_sg_cfg_cb__storage_model, surf_storage_model_description, "model",
- "The model to use for the storage");
-
declare_model_flag("network/model", "LV08", &_sg_cfg_cb__network_model, surf_network_model_description, "model",
"The model to use for the network");