-/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2019. 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. */
* The first step is to declare the code of your actors (what they do exactly does not matter to this example) and then
* you ask SimGrid to start your actors. There is three ways of doing so:
* - Directly, by instantiating your actor as parameter to Actor::create()
- * - By first registering your actors before instantiating it;
+ * - By first registering your actors before instantiating it
* - Through the deployment file.
*
* This example shows all these solutions, even if you obviously should use only one of these solutions to start your
*
* Later, this actor class is instantiated within the simulation.
*/
-static void receiver(std::string mailbox_name)
+static void receiver(const std::string& mailbox_name)
{
simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::by_name(mailbox_name);
std::string mbox = "mb42";
std::string msg = "GaBuZoMeu";
explicit Sender() = default; /* Sending the default message */
- explicit Sender(std::string arg) : msg(arg) { /* Sending the specified message */}
+ explicit Sender(const std::string& arg) : msg(arg) { /* Sending the specified message */}
explicit Sender(std::vector<std::string> args)
{
/* This constructor is used when we start the actor from the deployment file */