Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / cpp / comm-dependent / s4u-comm-dependent.cpp
index aa9e345..9cfafe5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -41,10 +41,10 @@ int main(int argc, char* argv[])
   sg4::Engine e(&argc, argv);
   e.load_platform(argv[1]);
 
-  sg4::Mailbox* mbox = sg4::Mailbox::by_name("Mailbox");
+  sg4::Mailbox* mbox = e.mailbox_by_name_or_create("Mailbox");
 
-  sg4::Actor::create("sender", sg4::Host::by_name("Tremblay"), sender, mbox);
-  sg4::Actor::create("receiver", sg4::Host::by_name("Jupiter"), receiver, mbox);
+  sg4::Actor::create("sender", e.host_by_name("Tremblay"), sender, mbox);
+  sg4::Actor::create("receiver", e.host_by_name("Jupiter"), receiver, mbox);
 
   e.run();