-/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2022. 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. */
{
XBT_INFO("*** GET/SET DATA for disk: %s ***", disk->get_cname());
- const std::string* data = static_cast<std::string*>(disk->get_data());
+ const std::string* data = disk->get_data<std::string>();
XBT_INFO("Get data: '%s'", data ? data->c_str() : "No User Data");
disk->set_data(new std::string("Some data"));
- data = static_cast<std::string*>(disk->get_data());
+ data = disk->get_data<std::string>();
XBT_INFO(" Set and get data: '%s'", data->c_str());
delete data;
}
xbt_assert(argc == 2, "Usage: %s platform_file\n", argv[0]);
e.load_platform(argv[1]);
- simgrid::s4u::Actor::create("server", simgrid::s4u::Host::by_name("alice"), server);
- simgrid::s4u::Actor::create("client", simgrid::s4u::Host::by_name("bob"), client);
+ simgrid::s4u::Actor::create("server", e.host_by_name("alice"), server);
+ simgrid::s4u::Actor::create("client", e.host_by_name("bob"), client);
e.run();
- XBT_INFO("Simulated time: %g", e.get_clock());
+ XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
return 0;
}