Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case s4u::Mailbox
[simgrid.git] / teshsuite / s4u / comm-pt2pt / comm-pt2pt.cpp
index 275712c..648e9a2 100644 (file)
@@ -51,7 +51,7 @@ static void sender(std::vector<std::string> args)
   for (unsigned int test = 1; test <= args[0].size(); test++) {
     this_actor::sleep_until(test * 5 - 5);
     std::string* mboxName         = new std::string("Test #" + std::to_string(test));
-    simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName->c_str());
+    simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(mboxName->c_str());
 
     switch (args[0][test - 1]) {
       case 'r':
@@ -98,7 +98,7 @@ static void receiver(std::vector<std::string> args)
   for (unsigned int test = 1; test <= args[0].size(); test++) {
     this_actor::sleep_until(test * 5 - 5);
     std::string mboxName          = "Test #" + std::to_string(test);
-    simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName.c_str());
+    simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(mboxName.c_str());
     void* received                = nullptr;
 
     switch (args[0][test - 1]) {
@@ -123,24 +123,24 @@ static void receiver(std::vector<std::string> args)
         break;
       case 'p':
         XBT_INFO("Test %u: p (regular receive on permanent mailbox)", test);
-        mbox->setReceiver(Actor::self());
+        mbox->set_receiver(Actor::self());
         received = mbox->get();
         break;
       case 'P':
         XBT_INFO("Test %u: P (sleep + regular receive on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
-        mbox->setReceiver(Actor::self());
+        mbox->set_receiver(Actor::self());
         received = mbox->get();
         break;
       case 'j':
         XBT_INFO("Test %u: j (irecv on permanent mailbox)", test);
-        mbox->setReceiver(Actor::self());
+        mbox->set_receiver(Actor::self());
         mbox->get_async(&received)->wait();
         break;
       case 'J':
         XBT_INFO("Test %u: J (sleep + irecv on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
-        mbox->setReceiver(Actor::self());
+        mbox->set_receiver(Actor::self());
         mbox->get_async(&received)->wait();
         break;
       default:
@@ -170,7 +170,7 @@ int main(int argc, char* argv[])
   if (argc < 2)
     usage(argv[0], specSend.c_str(), specRecv.c_str());
 
-  e.loadPlatform(argv[1]);
+  e.load_platform(argv[1]);
 
   if (argc >= 3) {
     argSend.clear();
@@ -182,13 +182,13 @@ int main(int argc, char* argv[])
   }
   xbt_assert(argSend.front().size() == argRecv.front().size(), "Sender and receiver spec must be of the same size");
 
-  std::vector<simgrid::s4u::Host*> hosts = e.getAllHosts();
+  std::vector<simgrid::s4u::Host*> hosts = e.get_all_hosts();
 
   simgrid::s4u::Actor::create("sender", hosts[0], sender, argSend);
   simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }