int main(int argc, char *argv[]) {
simgrid::s4u::Engine e(&argc, argv);
- e.set_config("Item:Value");
+ simgrid::s4u::Engine::set_config("Item:Value");
// Rest of your code
}
// You can use set_config(string) to pass a size that will be parsed. That value will be used for any subsequent
// actors
- e.set_config("contexts/stack-size:16384");
+ simgrid::s4u::Engine::set_config("contexts/stack-size:16384");
simgrid::s4u::Actor::create("actor", simgrid::s4u::Host::by_name("Tremblay"), actor);
simgrid::s4u::Actor::create("actor", simgrid::s4u::Host::by_name("Tremblay"), actor);
// You can use set_config(key, value) for the same effect.
- e.set_config("contexts/stack-size", 32 * 1024);
+ simgrid::s4u::Engine::set_config("contexts/stack-size", 32 * 1024);
simgrid::s4u::Actor::create("actor", simgrid::s4u::Host::by_name("Tremblay"), actor);
simgrid::s4u::Actor::create("actor", simgrid::s4u::Host::by_name("Tremblay"), actor);
{
sg_host_energy_plugin_init();
simgrid::s4u::Engine e(&argc, argv);
- e.set_config("host/model:ptask_L07");
+ simgrid::s4u::Engine::set_config("host/model:ptask_L07");
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
* @endrst
*
* Example:
- * e->set_config("host/model:ptask_L07");
+ * simgrid::s4u::Engine::set_config("host/model:ptask_L07");
*/
- void set_config(const std::string& str);
- void set_config(const std::string& name, int value);
- void set_config(const std::string& name, bool value);
- void set_config(const std::string& name, double value);
- void set_config(const std::string& name, const std::string& value);
+ static void set_config(const std::string& str);
+ static void set_config(const std::string& name, int value);
+ static void set_config(const std::string& name, bool value);
+ static void set_config(const std::string& name, double value);
+ static void set_config(const std::string& name, const std::string& value);
/** Callback fired when the platform is created (ie, the xml file parsed),
* right before the actual simulation starts. */