Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tend to the google coding standards in all S4U API
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 08:50:45 +0000 (10:50 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 08:50:45 +0000 (10:50 +0200)
77 files changed:
examples/s4u/actions-comm/s4u_actions-comm.cpp
examples/s4u/actions-storage/s4u_actions-storage.cpp
examples/s4u/actor-create/s4u_actor-create.cpp
examples/s4u/actor-migration/s4u_actor-migration.cpp
examples/s4u/actor-suspend/s4u_actor-suspend.cpp
examples/s4u/app-masterworker/s4u_app-masterworker.cpp
examples/s4u/app-token-ring/s4u_app-token-ring.cpp
examples/s4u/dht-chord/node.cpp
examples/s4u/dht-chord/s4u_dht-chord.cpp
examples/s4u/dht-chord/s4u_dht-chord.hpp
examples/s4u/io/s4u_io.cpp
examples/simdag/test/sd_test.cpp
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/File.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Mailbox.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/Storage.hpp
include/simgrid/s4u/VirtualMachine.hpp
src/bindings/java/jmsg.cpp
src/bindings/java/jmsg_as.cpp
src/bindings/java/jmsg_host.cpp
src/bindings/lua/lua_host.cpp
src/instr/instr_paje_containers.cpp
src/kernel/routing/NetPoint.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/mc/mc_smx.cpp
src/msg/instr_msg_process.cpp
src/msg/msg_environment.cpp
src/msg/msg_gos.cpp
src/msg/msg_host.cpp
src/msg/msg_io.cpp
src/msg/msg_process.cpp
src/msg/msg_vm.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/s4u_VirtualMachine.cpp
src/s4u/s4u_actor.cpp
src/s4u/s4u_comm.cpp
src/s4u/s4u_engine.cpp
src/s4u/s4u_file.cpp
src/s4u/s4u_host.cpp
src/s4u/s4u_mailbox.cpp
src/s4u/s4u_netzone.cpp
src/s4u/s4u_storage.cpp
src/simdag/sd_global.cpp
src/simdag/sd_task.cpp
src/simgrid/host.cpp
src/simix/ActorImpl.cpp
src/simix/libsmx.cpp
src/simix/smx_global.cpp
src/simix/smx_host.cpp
src/simix/smx_io.cpp
src/simix/smx_network.cpp
src/smpi/SmpiHost.cpp
src/smpi/smpi_dvfs.cpp
src/smpi/smpi_pmpi.cpp
src/smpi/smpi_request.cpp
src/surf/HostImpl.cpp
src/surf/cpu_interface.cpp
src/surf/instr_routing.cpp
src/surf/network_cm02.cpp
src/surf/network_ib.cpp
src/surf/network_ns3.cpp
src/surf/plugins/host_energy.cpp
src/surf/plugins/host_load.cpp
src/surf/sg_platf.cpp
src/surf/xml/surfxml_sax_cb.cpp
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/concurrent_rw/concurrent_rw.cpp
teshsuite/s4u/pid/pid.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp
teshsuite/simdag/flatifier/flatifier.cpp
teshsuite/simdag/is-router/is-router.cpp

index 644f266..2779185 100644 (file)
@@ -61,9 +61,9 @@ public:
     double size                 = std::stod(action[3]);
     char* payload               = xbt_strdup(action[3]);
     double clock                = simgrid::s4u::Engine::getClock();
     double size                 = std::stod(action[3]);
     char* payload               = xbt_strdup(action[3]);
     double clock                = simgrid::s4u::Engine::getClock();
-    simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::name() + "_" + action[2]);
+    simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getName() + "_" + action[2]);
     ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME, size,
     ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME, size,
-              simgrid::s4u::this_actor::name().c_str(), to->name());
+              simgrid::s4u::this_actor::getName().c_str(), to->getName());
     to->put(payload, size);
     xbt_free(payload);
 
     to->put(payload, size);
     xbt_free(payload);
 
@@ -74,9 +74,10 @@ public:
   {
     double clock = simgrid::s4u::Engine::getClock();
     simgrid::s4u::MailboxPtr from =
   {
     double clock = simgrid::s4u::Engine::getClock();
     simgrid::s4u::MailboxPtr from =
-        simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::name());
+        simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::getName());
 
 
-    ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::name().c_str(), from->name());
+    ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::getName().c_str(),
+              from->getName());
     from->get();
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
   }
     from->get();
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
   }
index 3b48581..85e71e1 100644 (file)
@@ -31,7 +31,7 @@ static void log_action(const char* const* action, double date)
 
 static simgrid::s4u::File* get_file_descriptor(const char* file_name)
 {
 
 static simgrid::s4u::File* get_file_descriptor(const char* file_name)
 {
-  std::string full_name = simgrid::s4u::this_actor::name() + ":" + file_name;
+  std::string full_name = simgrid::s4u::this_actor::getName() + ":" + file_name;
 
   return opened_files.at(full_name);
 }
 
   return opened_files.at(full_name);
 }
@@ -62,7 +62,7 @@ public:
   {
     const char* file_name = action[2];
     double clock          = simgrid::s4u::Engine::getClock();
   {
     const char* file_name = action[2];
     double clock          = simgrid::s4u::Engine::getClock();
-    std::string full_name = simgrid::s4u::this_actor::name() + ":" + file_name;
+    std::string full_name = simgrid::s4u::this_actor::getName() + ":" + file_name;
 
     ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
     simgrid::s4u::File* file = new simgrid::s4u::File(file_name, NULL);
 
     ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
     simgrid::s4u::File* file = new simgrid::s4u::File(file_name, NULL);
index 171935a..0d72402 100644 (file)
@@ -72,7 +72,7 @@ public:
   }
   void operator()()
   {
   }
   void operator()()
   {
-    XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->name());
+    XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->getName());
 
     char* msg1 = static_cast<char*>(mailbox->get());
     char* msg2 = static_cast<char*>(mailbox->get());
 
     char* msg1 = static_cast<char*>(mailbox->get());
     char* msg2 = static_cast<char*>(mailbox->get());
index f0fe008..102843c 100644 (file)
@@ -36,7 +36,7 @@ static void emigrant()
 
   simgrid::s4u::this_actor::suspend();
 
 
   simgrid::s4u::this_actor::suspend();
 
-  XBT_INFO("I've been moved on this new host: %s", simgrid::s4u::this_actor::host()->cname());
+  XBT_INFO("I've been moved on this new host: %s", simgrid::s4u::this_actor::getHost()->getCname());
   XBT_INFO("Uh, nothing to do here. Stopping now");
 }
 
   XBT_INFO("Uh, nothing to do here. Stopping now");
 }
 
index 0c59d04..9d98a4a 100644 (file)
@@ -32,7 +32,7 @@ static void lazy_guy()
 static void dream_master()
 {
   XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
 static void dream_master()
 {
   XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
-  simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::createActor("Lazy", simgrid::s4u::this_actor::host(), lazy_guy);
+  simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::createActor("Lazy", simgrid::s4u::this_actor::getHost(), lazy_guy);
   XBT_INFO("Let's wait a little bit...");
   simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
   XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
   XBT_INFO("Let's wait a little bit...");
   simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
   XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
 
   e->loadPlatform(argv[1]); /* - Load the platform description */
   std::vector<simgrid::s4u::Host*> list;
 
   e->loadPlatform(argv[1]); /* - Load the platform description */
   std::vector<simgrid::s4u::Host*> list;
-  e->hostList(&list);
+  e->getHostList(&list);
   simgrid::s4u::Actor::createActor("dream_master", list.front(), dream_master);
 
   e->run(); /* - Run the simulation */
   simgrid::s4u::Actor::createActor("dream_master", list.front(), dream_master);
 
   e->run(); /* - Run the simulation */
index 66c380f..8e13fc5 100644 (file)
@@ -38,7 +38,7 @@ public:
 
       if (number_of_tasks < 10000 || i % 10000 == 0)
         XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", (std::string("Task_") + std::to_string(i)).c_str(),
 
       if (number_of_tasks < 10000 || i % 10000 == 0)
         XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", (std::string("Task_") + std::to_string(i)).c_str(),
-                                                              number_of_tasks, mailbox->name());
+                 number_of_tasks, mailbox->getName());
 
       /* - Send the task to the @ref worker */
       char* payload = bprintf("%f", comp_size);
 
       /* - Send the task to the @ref worker */
       char* payload = bprintf("%f", comp_size);
index a5fc167..05fa909 100644 (file)
@@ -23,10 +23,10 @@ public:
 
   void operator()()
   {
 
   void operator()()
   {
-    rank = xbt_str_parse_int(simgrid::s4u::this_actor::name().c_str(),
+    rank = xbt_str_parse_int(simgrid::s4u::this_actor::getName().c_str(),
                              "Any process of this example must have a numerical name, not %s");
     my_mailbox = simgrid::s4u::Mailbox::byName(std::to_string(rank));
                              "Any process of this example must have a numerical name, not %s");
     my_mailbox = simgrid::s4u::Mailbox::byName(std::to_string(rank));
-    if (rank + 1 == simgrid::s4u::Engine::instance()->hostCount())
+    if (rank + 1 == simgrid::s4u::Engine::getInstance()->getHostCount())
       /* The last process, which sends the token back to rank 0 */
       neighbor_mailbox = simgrid::s4u::Mailbox::byName("0");
     else
       /* The last process, which sends the token back to rank 0 */
       neighbor_mailbox = simgrid::s4u::Mailbox::byName("0");
     else
@@ -35,7 +35,7 @@ public:
 
     if (rank == 0) {
       /* The root process (rank 0) first sends the token then waits to receive it back */
 
     if (rank == 0) {
       /* The root process (rank 0) first sends the token then waits to receive it back */
-      XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->name());
+      XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getName());
       neighbor_mailbox->put(xbt_strdup("Token"), task_comm_size);
       char* res = static_cast<char*>(my_mailbox->get());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
       neighbor_mailbox->put(xbt_strdup("Token"), task_comm_size);
       char* res = static_cast<char*>(my_mailbox->get());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
@@ -43,7 +43,7 @@ public:
     } else {
       char* res = static_cast<char*>(my_mailbox->get());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
     } else {
       char* res = static_cast<char*>(my_mailbox->get());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
-      XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->name());
+      XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getName());
       neighbor_mailbox->put(res, task_comm_size);
     }
   }
       neighbor_mailbox->put(res, task_comm_size);
     }
   }
@@ -55,10 +55,10 @@ int main(int argc, char** argv)
   xbt_assert(argc > 1, "Usage: %s platform.xml\n", argv[0]);
   e->loadPlatform(argv[1]);
 
   xbt_assert(argc > 1, "Usage: %s platform.xml\n", argv[0]);
   e->loadPlatform(argv[1]);
 
-  XBT_INFO("Number of hosts '%zu'", e->hostCount());
+  XBT_INFO("Number of hosts '%zu'", e->getHostCount());
   int id = 0;
   std::vector<simgrid::s4u::Host*> list;
   int id = 0;
   std::vector<simgrid::s4u::Host*> list;
-  e->hostList(&list);
+  e->getHostList(&list);
   for (auto host : list) {
     /* - Give a unique rank to each host and create a @ref relay_runner process on each */
     simgrid::s4u::Actor::createActor((std::to_string(id)).c_str(), host, RelayRunner());
   for (auto host : list) {
     /* - Give a unique rank to each host and create a @ref relay_runner process on each */
     simgrid::s4u::Actor::createActor((std::to_string(id)).c_str(), host, RelayRunner());
index 79aef92..184c1e3 100644 (file)
@@ -47,7 +47,7 @@ Node::Node(std::vector<std::string> args)
 
   // initialize my node
   id_                = std::stoi(args[1]);
 
   // initialize my node
   id_                = std::stoi(args[1]);
-  stream             = simgrid::s4u::this_actor::host()->extension<HostChord>()->getStream();
+  stream             = simgrid::s4u::this_actor::getHost()->extension<HostChord>()->getStream();
   mailbox_           = simgrid::s4u::Mailbox::byName(std::to_string(id_));
   next_finger_to_fix = 0;
   fingers_           = new int[nb_bits];
   mailbox_           = simgrid::s4u::Mailbox::byName(std::to_string(id_));
   next_finger_to_fix = 0;
   fingers_           = new int[nb_bits];
@@ -230,7 +230,7 @@ void Node::checkPredecessor()
   }
   // receive the answer
   XBT_DEBUG("Sent 'Predecessor Alive' request to %d, waiting for the answer on my mailbox '%s'", pred_id_,
   }
   // receive the answer
   XBT_DEBUG("Sent 'Predecessor Alive' request to %d, waiting for the answer on my mailbox '%s'", pred_id_,
-            message->answer_to->name());
+            message->answer_to->getName());
   simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
 
   try {
   simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
 
   try {
@@ -275,7 +275,7 @@ int Node::remoteGetPredecessor(int ask_to)
 
   // receive the answer
   XBT_DEBUG("Sent 'Get Predecessor' request to %d, waiting for the answer on my mailbox '%s'", ask_to,
 
   // receive the answer
   XBT_DEBUG("Sent 'Get Predecessor' request to %d, waiting for the answer on my mailbox '%s'", ask_to,
-            message->answer_to->name());
+            message->answer_to->getName());
   simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
 
   try {
   simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
 
   try {
@@ -430,7 +430,8 @@ void Node::handleMessage(ChordMessage* message)
       message->type = FIND_SUCCESSOR_ANSWER;
       message->answer_id = fingers_[0];
       XBT_DEBUG("Sending back a 'Find Successor Answer' to %s (mailbox %s): the successor of %d is %d",
       message->type = FIND_SUCCESSOR_ANSWER;
       message->answer_id = fingers_[0];
       XBT_DEBUG("Sending back a 'Find Successor Answer' to %s (mailbox %s): the successor of %d is %d",
-          message->issuer_host_name.c_str(), message->answer_to->name(), message->request_id, message->answer_id);
+                message->issuer_host_name.c_str(), message->answer_to->getName(), message->request_id,
+                message->answer_id);
       message->answer_to->put_init(message, 10)->detach();
     } else {
       // otherwise, forward the request to the closest preceding finger in my table
       message->answer_to->put_init(message, 10)->detach();
     } else {
       // otherwise, forward the request to the closest preceding finger in my table
@@ -447,7 +448,7 @@ void Node::handleMessage(ChordMessage* message)
     message->type = GET_PREDECESSOR_ANSWER;
     message->answer_id = pred_id_;
     XBT_DEBUG("Sending back a 'Get Predecessor Answer' to %s via mailbox '%s': my predecessor is %d",
     message->type = GET_PREDECESSOR_ANSWER;
     message->answer_id = pred_id_;
     XBT_DEBUG("Sending back a 'Get Predecessor Answer' to %s via mailbox '%s': my predecessor is %d",
-        message->issuer_host_name.c_str(), message->answer_to->name(), message->answer_id);
+              message->issuer_host_name.c_str(), message->answer_to->getName(), message->answer_id);
     message->answer_to->put_init(message, 10)->detach();
     break;
 
     message->answer_to->put_init(message, 10)->detach();
     break;
 
@@ -484,8 +485,8 @@ void Node::handleMessage(ChordMessage* message)
   case PREDECESSOR_ALIVE:
     XBT_DEBUG("Receiving a 'Predecessor Alive' request from %s", message->issuer_host_name.c_str());
     message->type = PREDECESSOR_ALIVE_ANSWER;
   case PREDECESSOR_ALIVE:
     XBT_DEBUG("Receiving a 'Predecessor Alive' request from %s", message->issuer_host_name.c_str());
     message->type = PREDECESSOR_ALIVE_ANSWER;
-    XBT_DEBUG("Sending back a 'Predecessor Alive Answer' to %s (mailbox %s)",
-        message->issuer_host_name.c_str(), message->answer_to->name());
+    XBT_DEBUG("Sending back a 'Predecessor Alive Answer' to %s (mailbox %s)", message->issuer_host_name.c_str(),
+              message->answer_to->getName());
     message->answer_to->put_init(message, 10)->detach();
     break;
 
     message->answer_to->put_init(message, 10)->detach();
     break;
 
index 2c5ed69..1a9db78 100644 (file)
@@ -29,7 +29,7 @@ static void chord_init()
   HostChord::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostChord>();
 
   std::vector<simgrid::s4u::Host*> list;
   HostChord::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostChord>();
 
   std::vector<simgrid::s4u::Host*> list;
-  simgrid::s4u::Engine::instance()->hostList(&list);
+  simgrid::s4u::Engine::getInstance()->getHostList(&list);
   for (auto host : list)
     host->extension_set(new HostChord(host));
 }
   for (auto host : list)
     host->extension_set(new HostChord(host));
 }
index 77981df..04f0c22 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   explicit HostChord(simgrid::s4u::Host* ptr) : host(ptr)
   {
 
   explicit HostChord(simgrid::s4u::Host* ptr) : host(ptr)
   {
-    std::string descr = std::string("RngSream<") + host->cname() + ">";
+    std::string descr = std::string("RngSream<") + host->getCname() + ">";
     stream_           = RngStream_CreateStream(descr.c_str());
   }
 
     stream_           = RngStream_CreateStream(descr.c_str());
   }
 
@@ -63,7 +63,8 @@ public:
   int answer_id      = -1;            // answer (used by some types of messages)
   simgrid::s4u::MailboxPtr answer_to; // mailbox to send an answer to (if any)
 
   int answer_id      = -1;            // answer (used by some types of messages)
   simgrid::s4u::MailboxPtr answer_to; // mailbox to send an answer to (if any)
 
-  explicit ChordMessage(e_message_type_t type) : type(type), issuer_host_name(simgrid::s4u::this_actor::host()->name())
+  explicit ChordMessage(e_message_type_t type)
+      : type(type), issuer_host_name(simgrid::s4u::this_actor::getHost()->getName())
   {
   }
 
   {
   }
 
index a09685d..378f271 100644 (file)
@@ -13,25 +13,25 @@ class MyHost {
 public:
   void show_info(std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts)
   {
 public:
   void show_info(std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts)
   {
-    XBT_INFO("Storage info on %s:", simgrid::s4u::Host::current()->cname());
+    XBT_INFO("Storage info on %s:", simgrid::s4u::Host::current()->getCname());
 
     for (const auto&kv : mounts) {
       const char* mountpoint = kv.first.c_str();
       simgrid::s4u::Storage* storage = kv.second;
 
       // Retrieve disk's information
 
     for (const auto&kv : mounts) {
       const char* mountpoint = kv.first.c_str();
       simgrid::s4u::Storage* storage = kv.second;
 
       // Retrieve disk's information
-      sg_size_t free_size = storage->sizeFree();
-      sg_size_t used_size = storage->sizeUsed();
-      sg_size_t size      = storage->size();
+      sg_size_t free_size = storage->getSizeFree();
+      sg_size_t used_size = storage->getSizeUsed();
+      sg_size_t size      = storage->getSize();
 
 
-      XBT_INFO("    %s (%s) Used: %llu; Free: %llu; Total: %llu.", storage->name(), mountpoint, used_size, free_size,
+      XBT_INFO("    %s (%s) Used: %llu; Free: %llu; Total: %llu.", storage->getName(), mountpoint, used_size, free_size,
                size);
     }
   }
 
   void operator()() {
     std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts =
                size);
     }
   }
 
   void operator()() {
     std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts =
-        simgrid::s4u::Host::current()->mountedStorages();
+        simgrid::s4u::Host::current()->getMountedStorages();
 
     show_info(mounts);
 
 
     show_info(mounts);
 
@@ -59,25 +59,25 @@ public:
 
     // Now rename file from ./tmp/data.txt to ./tmp/simgrid.readme
     const char *newpath = "/home/tmp/simgrid.readme";
 
     // Now rename file from ./tmp/data.txt to ./tmp/simgrid.readme
     const char *newpath = "/home/tmp/simgrid.readme";
-    XBT_INFO("Move '%s' to '%s'", file->path(), newpath);
+    XBT_INFO("Move '%s' to '%s'", file->getPath(), newpath);
     file->move(newpath);
 
     // Test attaching some user data to the file
     file->setUserdata(xbt_strdup("777"));
     file->move(newpath);
 
     // Test attaching some user data to the file
     file->setUserdata(xbt_strdup("777"));
-    XBT_INFO("User data attached to the file: %s", (char*)file->userdata());
-    xbt_free(file->userdata());
+    XBT_INFO("User data attached to the file: %s", (char*)file->getUserdata());
+    xbt_free(file->getUserdata());
 
     // Close the file
     delete file;
 
     // Now attach some user data to disk1
 
     // Close the file
     delete file;
 
     // Now attach some user data to disk1
-    XBT_INFO("Get/set data for storage element: %s", storage->name());
-    XBT_INFO("    Uninitialized storage data: '%s'", (char*)storage->userdata());
+    XBT_INFO("Get/set data for storage element: %s", storage->getName());
+    XBT_INFO("    Uninitialized storage data: '%s'", (char*)storage->getUserdata());
 
     storage->setUserdata(xbt_strdup("Some user data"));
 
     storage->setUserdata(xbt_strdup("Some user data"));
-    XBT_INFO("    Set and get data: '%s'", (char*)storage->userdata());
+    XBT_INFO("    Set and get data: '%s'", (char*)storage->getUserdata());
 
 
-    xbt_free(storage->userdata());
+    xbt_free(storage->getUserdata());
   }
 };
 
   }
 };
 
index 0a698f8..5ba0bc0 100644 (file)
@@ -34,10 +34,10 @@ int main(int argc, char **argv)
   double comp_amount2 = 1000000;
   double comm_amount12 = 2000000;
   double comm_amount21 = 3000000;
   double comp_amount2 = 1000000;
   double comm_amount12 = 2000000;
   double comm_amount21 = 3000000;
-  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount1, h1->cname(), comp_amount1/h1->speed());
-  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount2, h2->cname(), comp_amount2/h2->speed());
+  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount1, h1->getCname(), comp_amount1 / h1->getSpeed());
+  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount2, h2->getCname(), comp_amount2 / h2->getSpeed());
 
 
-  XBT_INFO("Route between %s and %s:", h1->cname(), h2->cname());
+  XBT_INFO("Route between %s and %s:", h1->getCname(), h2->getCname());
   std::vector<sg_link_t> route;
   double latency = 0;
   h1->routeTo(h2, &route, &latency);
   std::vector<sg_link_t> route;
   double latency = 0;
   h1->routeTo(h2, &route, &latency);
@@ -47,10 +47,10 @@ int main(int argc, char **argv)
              sg_link_bandwidth(link));
 
   XBT_INFO("Route latency = %f, route bandwidth = %f", latency, sg_host_route_bandwidth(h1, h2));
              sg_link_bandwidth(link));
 
   XBT_INFO("Route latency = %f, route bandwidth = %f", latency, sg_host_route_bandwidth(h1, h2));
-  XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount12,  h1->cname(), h2->cname(),
-        sg_host_route_latency(h1, h2) + comm_amount12 / sg_host_route_bandwidth(h1, h2));
-  XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount21,  h2->cname(), h1->cname(),
-        sg_host_route_latency(h2, h1) + comm_amount21 / sg_host_route_bandwidth(h2, h1));
+  XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount12, h1->getCname(), h2->getCname(),
+           sg_host_route_latency(h1, h2) + comm_amount12 / sg_host_route_bandwidth(h1, h2));
+  XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount21, h2->getCname(), h1->getCname(),
+           sg_host_route_latency(h2, h1) + comm_amount21 / sg_host_route_bandwidth(h2, h1));
 
   /* creation of the tasks and their dependencies */
   SD_task_t taskA = SD_task_create("Task A", NULL, 10.0);
 
   /* creation of the tasks and their dependencies */
   SD_task_t taskA = SD_task_create("Task A", NULL, 10.0);
index eec45c1..960118c 100644 (file)
@@ -198,19 +198,19 @@ public:
   void daemonize();
 
   /** Retrieves the name of that actor as a C string */
   void daemonize();
 
   /** Retrieves the name of that actor as a C string */
-  const char* cname();
+  const char* getCname();
   /** Retrieves the name of that actor as a C++ string */
   /** Retrieves the name of that actor as a C++ string */
-  simgrid::xbt::string name();
+  simgrid::xbt::string getName();
   /** Retrieves the host on which that actor is running */
   /** Retrieves the host on which that actor is running */
-  s4u::Host* host();
+  s4u::Host* getHost();
   /** Retrieves the PID of that actor
    *
    * actor_id_t is an alias for unsigned long */
   /** Retrieves the PID of that actor
    *
    * actor_id_t is an alias for unsigned long */
-  aid_t pid();
+  aid_t getPid();
   /** Retrieves the PPID of that actor
    *
    * actor_id_t is an alias for unsigned long */
   /** Retrieves the PPID of that actor
    *
    * actor_id_t is an alias for unsigned long */
-  aid_t ppid();
+  aid_t getPpid();
 
   /** Suspend an actor by suspending the task on which it was waiting for the completion. */
   void suspend();
 
   /** Suspend an actor by suspending the task on which it was waiting for the completion. */
   void suspend();
@@ -232,7 +232,7 @@ public:
   /** Sets the time at which that actor should be killed */
   void setKillTime(double time);
   /** Retrieves the time at which that actor will be killed (or -1 if not set) */
   /** Sets the time at which that actor should be killed */
   void setKillTime(double time);
   /** Retrieves the time at which that actor will be killed (or -1 if not set) */
-  double killTime();
+  double getKillTime();
 
   void migrate(Host * new_host);
 
 
   void migrate(Host * new_host);
 
@@ -267,7 +267,7 @@ public:
   simix::ActorImpl* getImpl();
 
   /** Retrieve the property value (or nullptr if not set) */
   simix::ActorImpl* getImpl();
 
   /** Retrieve the property value (or nullptr if not set) */
-  const char* property(const char* key);
+  const char* getProperty(const char* key);
   void setProperty(const char* key, const char* value);
 };
 
   void setProperty(const char* key, const char* value);
 };
 
@@ -325,16 +325,16 @@ template <class Rep, class Period> inline void sleep_for(std::chrono::duration<R
   XBT_ATTRIB_DEPRECATED("Please use Mailbox::put_async") isend(MailboxPtr chan, void* payload, double simulatedSize);
 
   /** @brief Returns the actor ID of the current actor (same as pid). */
   XBT_ATTRIB_DEPRECATED("Please use Mailbox::put_async") isend(MailboxPtr chan, void* payload, double simulatedSize);
 
   /** @brief Returns the actor ID of the current actor (same as pid). */
-  XBT_PUBLIC(aid_t) pid();
+  XBT_PUBLIC(aid_t) getPid();
 
   /** @brief Returns the ancestor's actor ID of the current actor (same as ppid). */
 
   /** @brief Returns the ancestor's actor ID of the current actor (same as ppid). */
-  XBT_PUBLIC(aid_t) ppid();
+  XBT_PUBLIC(aid_t) getPpid();
 
   /** @brief Returns the name of the current actor. */
 
   /** @brief Returns the name of the current actor. */
-  XBT_PUBLIC(std::string) name();
+  XBT_PUBLIC(std::string) getName();
 
   /** @brief Returns the name of the host on which the process is running. */
 
   /** @brief Returns the name of the host on which the process is running. */
-  XBT_PUBLIC(Host*) host();
+  XBT_PUBLIC(Host*) getHost();
 
   /** @brief Suspend the actor. */
   XBT_PUBLIC(void) suspend();
 
   /** @brief Suspend the actor. */
   XBT_PUBLIC(void) suspend();
index a2c71d0..369b718 100644 (file)
@@ -113,7 +113,7 @@ public:
   void cancel();
 
   /** Retrieve the mailbox on which this comm acts */
   void cancel();
 
   /** Retrieve the mailbox on which this comm acts */
-  MailboxPtr mailbox();
+  MailboxPtr getMailbox();
 
 private:
   double rate_        = -1;
 
 private:
   double rate_        = -1;
index 94dc8d1..feef402 100644 (file)
@@ -56,8 +56,8 @@ public:
   /** @brief Load a deployment file and launch the actors that it contains */
   void loadDeployment(const char* deploy);
 
   /** @brief Load a deployment file and launch the actors that it contains */
   void loadDeployment(const char* deploy);
 
-  size_t hostCount();
-  void hostList(std::vector<Host*> * whereTo);
+  size_t getHostCount();
+  void getHostList(std::vector<Host*> * whereTo);
 
   /** @brief Run the simulation */
   void run();
 
   /** @brief Run the simulation */
   void run();
@@ -66,17 +66,17 @@ public:
   static double getClock();
 
   /** @brief Retrieve the engine singleton */
   static double getClock();
 
   /** @brief Retrieve the engine singleton */
-  static s4u::Engine* instance();
+  static s4u::Engine* getInstance();
 
   /** @brief Retrieve the root netzone, containing all others */
 
   /** @brief Retrieve the root netzone, containing all others */
-  simgrid::s4u::NetZone* netRoot();
+  simgrid::s4u::NetZone* getNetRoot();
 
   /** @brief Retrieve the netzone of the given name (or nullptr if not found) */
 
   /** @brief Retrieve the netzone of the given name (or nullptr if not found) */
-  simgrid::s4u::NetZone* netzoneByNameOrNull(const char* name);
+  simgrid::s4u::NetZone* getNetzoneByNameOrNull(const char* name);
 
   /** @brief Retrieve the netcard of the given name (or nullptr if not found) */
 
   /** @brief Retrieve the netcard of the given name (or nullptr if not found) */
-  simgrid::kernel::routing::NetPoint* netpointByNameOrNull(const char* name);
-  void netpointList(std::vector<simgrid::kernel::routing::NetPoint*> * list);
+  simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(const char* name);
+  void getNetpointList(std::vector<simgrid::kernel::routing::NetPoint*> * list);
   void netpointRegister(simgrid::kernel::routing::NetPoint * card);
   void netpointUnregister(simgrid::kernel::routing::NetPoint * card);
 
   void netpointRegister(simgrid::kernel::routing::NetPoint * card);
   void netpointUnregister(simgrid::kernel::routing::NetPoint * card);
 
index d6cd734..5c3dc74 100644 (file)
@@ -30,7 +30,7 @@ public:
   ~File();
 
   /** Retrieves the path to the file */
   ~File();
 
   /** Retrieves the path to the file */
-  const char* path() { return path_; }
+  const char* getPath() { return path_; }
 
   /** Simulates a read action. Returns the size of data actually read
    *
 
   /** Simulates a read action. Returns the size of data actually read
    *
@@ -46,7 +46,7 @@ public:
   /** Allows to store user data on that host */
   void setUserdata(void* data) { userdata_ = data; }
   /** Retrieves the previously stored data */
   /** Allows to store user data on that host */
   void setUserdata(void* data) { userdata_ = data; }
   /** Retrieves the previously stored data */
-  void* userdata() { return userdata_; }
+  void* getUserdata() { return userdata_; }
 
   /** Retrieve the datasize */
   sg_size_t size();
 
   /** Retrieve the datasize */
   sg_size_t size();
index 31ecd57..d43c985 100644 (file)
@@ -66,8 +66,8 @@ public:
   /** Retrieves the host on which the current actor is running */
   static s4u::Host* current();
 
   /** Retrieves the host on which the current actor is running */
   static s4u::Host* current();
 
-  simgrid::xbt::string const& name() const { return name_; }
-  const char* cname() { return name_.c_str(); }
+  simgrid::xbt::string const& getName() const { return name_; }
+  const char* getCname() { return name_.c_str(); }
 
   void actorList(std::vector<ActorPtr> * whereto);
 
 
   void actorList(std::vector<ActorPtr> * whereto);
 
@@ -84,23 +84,23 @@ public:
   /** Returns if that host is currently down and offline */
   bool isOff() { return not isOn(); }
 
   /** Returns if that host is currently down and offline */
   bool isOff() { return not isOn(); }
 
-  double speed();
-  int coreCount();
-  xbt_dict_t properties();
-  const char* property(const char* key);
+  double getSpeed();
+  int getCoreCount();
+  xbt_dict_t getProperties();
+  const char* getProperty(const char* key);
   void setProperty(const char* key, const char* value);
   void setProperty(const char* key, const char* value);
-  void processes(std::vector<ActorPtr> * list);
+  void getProcesses(std::vector<ActorPtr> * list);
   double getPstateSpeed(int pstate_index);
   double getPstateSpeed(int pstate_index);
-  int pstatesCount() const;
+  int getPstatesCount() const;
   void setPstate(int pstate_index);
   void setPstate(int pstate_index);
-  int pstate();
-  void attachedStorages(std::vector<const char*> * storages);
+  int getPstate();
+  void getAttachedStorages(std::vector<const char*> * storages);
 
   /** Get an associative list [mount point]->[Storage] of all local mount points.
    *
    *  This is defined in the platform file, and cannot be modified programatically (yet).
    */
 
   /** Get an associative list [mount point]->[Storage] of all local mount points.
    *
    *  This is defined in the platform file, and cannot be modified programatically (yet).
    */
-  std::unordered_map<std::string, Storage*> const& mountedStorages();
+  std::unordered_map<std::string, Storage*> const& getMountedStorages();
 
   void routeTo(Host * dest, std::vector<Link*> * links, double* latency);
   void routeTo(Host * dest, std::vector<surf::LinkImpl*> * links, double* latency);
 
   void routeTo(Host * dest, std::vector<Link*> * links, double* latency);
   void routeTo(Host * dest, std::vector<surf::LinkImpl*> * links, double* latency);
index 42e08f7..f7797dd 100644 (file)
@@ -121,7 +121,7 @@ public:
   kernel::activity::MailboxImpl* getImpl() { return pimpl_; }
 
   /** Gets the name of that mailbox */
   kernel::activity::MailboxImpl* getImpl() { return pimpl_; }
 
   /** Gets the name of that mailbox */
-  const char *name();
+  const char* getName();
 
   /** Retrieve the mailbox associated to the given C string */
   static MailboxPtr byName(const char *name);
 
   /** Retrieve the mailbox associated to the given C string */
   static MailboxPtr byName(const char *name);
@@ -147,7 +147,7 @@ public:
   void setReceiver(ActorPtr actor);
 
   /** Return the actor declared as permanent receiver, or nullptr if none **/
   void setReceiver(ActorPtr actor);
 
   /** Return the actor declared as permanent receiver, or nullptr if none **/
-  ActorPtr receiver();
+  ActorPtr getReceiver();
 
   /** Creates (but don't start) an emission to that mailbox */
   CommPtr put_init();
 
   /** Creates (but don't start) an emission to that mailbox */
   CommPtr put_init();
index fe9d878..cb9d1ee 100644 (file)
@@ -44,17 +44,17 @@ protected:
 public:
   /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
   virtual void seal();
 public:
   /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
   virtual void seal();
-  char* name();
-  NetZone* father();
+  char* getCname();
+  NetZone* getFather();
 
 
-  std::vector<NetZone*>* children(); // Sub netzones
-  void hosts(std::vector<s4u::Host*> * whereto); // retrieve my content as a vector of hosts
+  std::vector<NetZone*>* getChildren();             // Sub netzones
+  void getHosts(std::vector<s4u::Host*> * whereto); // retrieve my content as a vector of hosts
 
   /** Get the properties assigned to a host */
 
   /** Get the properties assigned to a host */
-  std::unordered_map<std::string, std::string>* properties();
+  std::unordered_map<std::string, std::string>* getProperties();
 
   /** Retrieve the property value (or nullptr if not set) */
 
   /** Retrieve the property value (or nullptr if not set) */
-  const char* property(const char* key);
+  const char* getProperty(const char* key);
   void setProperty(const char* key, const char* value);
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
   void setProperty(const char* key, const char* value);
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
index f366c3a..615e3e7 100644 (file)
@@ -29,21 +29,21 @@ public:
   virtual ~Storage() = default;
   /** Retrieve a Storage by its name. It must exist in the platform file */
   static Storage* byName(const char* name);
   virtual ~Storage() = default;
   /** Retrieve a Storage by its name. It must exist in the platform file */
   static Storage* byName(const char* name);
-  const char* name();
-  const char* type();
-  Host* host();
-  sg_size_t sizeFree();
-  sg_size_t sizeUsed();
+  const char* getName();
+  const char* getType();
+  Host* getHost();
+  sg_size_t getSizeFree();
+  sg_size_t getSizeUsed();
   /** Retrieve the total amount of space of this storage element */
   /** Retrieve the total amount of space of this storage element */
-  sg_size_t size();
+  sg_size_t getSize();
 
 
-  xbt_dict_t properties();
-  const char* property(const char* key);
+  xbt_dict_t getProperties();
+  const char* getProperty(const char* key);
   void setProperty(const char* key, char* value);
   void setProperty(const char* key, char* value);
-  std::map<std::string, sg_size_t>* content();
+  std::map<std::string, sg_size_t>* getContent();
 
   void setUserdata(void* data) { userdata_ = data; }
 
   void setUserdata(void* data) { userdata_ = data; }
-  void* userdata() { return userdata_; }
+  void* getUserdata() { return userdata_; }
 
   /* The signals */
   /** @brief Callback signal fired when a new Link is created */
 
   /* The signals */
   /** @brief Callback signal fired when a new Link is created */
index d9d3ba7..b5dbf21 100644 (file)
@@ -47,10 +47,10 @@ private:
 public:
   bool isMigrating();
 
 public:
   bool isMigrating();
 
-  void parameters(vm_params_t params);
+  void getParameters(vm_params_t params);
   void setParameters(vm_params_t params);
   double getRamsize();
   void setParameters(vm_params_t params);
   double getRamsize();
-  simgrid::s4u::Host* pm();
+  simgrid::s4u::Host* getPm();
 
   e_surf_vm_state_t getState();
 
 
   e_surf_vm_state_t getState();
 
index b732649..4f76619 100644 (file)
@@ -285,7 +285,7 @@ static int java_main(int argc, char *argv[])
   for (int i = 1; i < argc; i++)
       env->SetObjectArrayElement(args,i - 1, env->NewStringUTF(argv[i]));
   //Retrieve the host for the process.
   for (int i = 1; i < argc; i++)
       env->SetObjectArrayElement(args,i - 1, env->NewStringUTF(argv[i]));
   //Retrieve the host for the process.
-  jstring jhostName = env->NewStringUTF(MSG_host_self()->cname());
+  jstring jhostName = env->NewStringUTF(MSG_host_self()->getCname());
   jobject jhost = Java_org_simgrid_msg_Host_getByName(env, nullptr, jhostName);
   //creates the process
   jobject jprocess = env->NewObject(class_Process, constructor_Process, jhost, jname, args);
   jobject jhost = Java_org_simgrid_msg_Host_getByName(env, nullptr, jhostName);
   //creates the process
   jobject jprocess = env->NewObject(class_Process, constructor_Process, jhost, jname, args);
index af1aa6f..cd344be 100644 (file)
@@ -58,7 +58,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_As_nativeInit(JNIEnv* env, jclass cl
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getName(JNIEnv * env, jobject jas) {
   simgrid::s4u::NetZone* as = jnetzone_get_native(env, jas);
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getName(JNIEnv * env, jobject jas) {
   simgrid::s4u::NetZone* as = jnetzone_get_native(env, jas);
-  return env->NewStringUTF(as->name());
+  return env->NewStringUTF(as->getCname());
 }
 
 JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv * env, jobject jas) {
 }
 
 JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv * env, jobject jas) {
@@ -71,14 +71,14 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv * env, job
   if (not cls)
     return nullptr;
 
   if (not cls)
     return nullptr;
 
-  jtable = env->NewObjectArray(static_cast<jsize>(self_as->children()->size()), cls, nullptr);
+  jtable = env->NewObjectArray(static_cast<jsize>(self_as->getChildren()->size()), cls, nullptr);
 
   if (not jtable) {
     jxbt_throw_jni(env, "Hosts table allocation failed");
     return nullptr;
   }
 
 
   if (not jtable) {
     jxbt_throw_jni(env, "Hosts table allocation failed");
     return nullptr;
   }
 
-  for (auto tmp_as : *self_as->children()) {
+  for (auto tmp_as : *self_as->getChildren()) {
     jobject tmp_jas = jnetzone_new_instance(env);
     if (not tmp_jas) {
       jxbt_throw_jni(env, "java As instantiation failed");
     jobject tmp_jas = jnetzone_new_instance(env);
     if (not tmp_jas) {
       jxbt_throw_jni(env, "java As instantiation failed");
@@ -130,7 +130,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jo
     return nullptr;
 
   std::vector<sg_host_t> table;
     return nullptr;
 
   std::vector<sg_host_t> table;
-  as->hosts(&table);
+  as->getHosts(&table);
 
   jtable = env->NewObjectArray(static_cast<jsize>(table.size()), cls, nullptr);
 
 
   jtable = env->NewObjectArray(static_cast<jsize>(table.size()), cls, nullptr);
 
@@ -143,11 +143,11 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jo
   for (auto host : table) {
     jhost = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
     if (not jhost) {
   for (auto host : table) {
     jhost = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
     if (not jhost) {
-      jname = env->NewStringUTF(host->cname());
+      jname = env->NewStringUTF(host->getCname());
 
       jhost = Java_org_simgrid_msg_Host_getByName(env, cls, jname);
 
 
       jhost = Java_org_simgrid_msg_Host_getByName(env, cls, jname);
 
-      env->ReleaseStringUTFChars(static_cast<jstring>(jname), host->cname());
+      env->ReleaseStringUTFChars(static_cast<jstring>(jname), host->getCname());
     }
 
     env->SetObjectArrayElement(jtable, index, jhost);
     }
 
     env->SetObjectArrayElement(jtable, index, jhost);
index 3f41bfd..fc8db65 100644 (file)
@@ -122,7 +122,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_currentHost(JNIEnv * env, jc
       return nullptr;
     }
     /* Sets the host name */
       return nullptr;
     }
     /* Sets the host name */
-    jobject jname = env->NewStringUTF(host->cname());
+    jobject jname = env->NewStringUTF(host->getCname());
     env->SetObjectField(jhost, jhost_field_Host_name, jname);
     /* Bind & store it */
     jhost_bind(jhost, host, env);
     env->SetObjectField(jhost, jhost_field_Host_name, jname);
     /* Bind & store it */
     jhost_bind(jhost, host, env);
@@ -319,7 +319,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_all(JNIEnv * env, jclas
     jobject jhost   = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
 
     if (not jhost) {
     jobject jhost   = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
 
     if (not jhost) {
-      jstring jname = env->NewStringUTF(host->cname());
+      jstring jname = env->NewStringUTF(host->getCname());
       jhost         = Java_org_simgrid_msg_Host_getByName(env, cls_arg, jname);
     }
 
       jhost         = Java_org_simgrid_msg_Host_getByName(env, cls_arg, jname);
     }
 
index 4d4eac9..9220e67 100644 (file)
@@ -77,7 +77,7 @@ static int l_host_get_by_name(lua_State * L)
 static int l_host_get_name(lua_State * L)
 {
   sg_host_t ht = sglua_check_host(L, 1);
 static int l_host_get_name(lua_State * L)
 {
   sg_host_t ht = sglua_check_host(L, 1);
-  lua_pushstring(L, ht->cname());
+  lua_pushstring(L, ht->getCname());
   return 1;
 }
 
   return 1;
 }
 
index c2b6515..b5d9800 100644 (file)
@@ -66,11 +66,11 @@ container_t PJ_container_new (const char *name, e_container_types kind, containe
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     case INSTR_ROUTER:
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     case INSTR_ROUTER:
-      newContainer->netpoint = simgrid::s4u::Engine::instance()->netpointByNameOrNull(name);
+      newContainer->netpoint = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     case INSTR_AS:
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     case INSTR_AS:
-      newContainer->netpoint = simgrid::s4u::Engine::instance()->netpointByNameOrNull(name);
+      newContainer->netpoint = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     default:
       xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
       break;
     default:
index 054b8b4..3670c70 100644 (file)
@@ -21,7 +21,7 @@ NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl*
 {
   if (netzone_p != nullptr)
     id_ = netzone_p->addComponent(this);
 {
   if (netzone_p != nullptr)
     id_ = netzone_p->addComponent(this);
-  simgrid::s4u::Engine::instance()->netpointRegister(this);
+  simgrid::s4u::Engine::getInstance()->netpointRegister(this);
   simgrid::kernel::routing::NetPoint::onCreation(this);
 }
 }
   simgrid::kernel::routing::NetPoint::onCreation(this);
 }
 }
@@ -34,5 +34,5 @@ NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl*
  */
 simgrid::kernel::routing::NetPoint* sg_netpoint_by_name_or_null(const char* name)
 {
  */
 simgrid::kernel::routing::NetPoint* sg_netpoint_by_name_or_null(const char* name)
 {
-  return simgrid::s4u::Engine::instance()->netpointByNameOrNull(name);
+  return simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
 }
 }
index dc90792..2b4a84d 100644 (file)
@@ -28,7 +28,7 @@ public:
 
 NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, name)
 {
 
 NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, name)
 {
-  xbt_assert(nullptr == simgrid::s4u::Engine::instance()->netpointByNameOrNull(name),
+  xbt_assert(nullptr == simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name),
              "Refusing to create a second NetZone called '%s'.", name);
 
   netpoint_ = new NetPoint(name, NetPoint::Type::NetZone, static_cast<NetZoneImpl*>(father));
              "Refusing to create a second NetZone called '%s'.", name);
 
   netpoint_ = new NetPoint(name, NetPoint::Type::NetZone, static_cast<NetZoneImpl*>(father));
@@ -39,7 +39,7 @@ NetZoneImpl::~NetZoneImpl()
   for (auto& kv : bypassRoutes_)
     delete kv.second;
 
   for (auto& kv : bypassRoutes_)
     delete kv.second;
 
-  simgrid::s4u::Engine::instance()->netpointUnregister(netpoint_);
+  simgrid::s4u::Engine::getInstance()->netpointUnregister(netpoint_);
 }
 
 simgrid::s4u::Host* NetZoneImpl::createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
 }
 
 simgrid::s4u::Host* NetZoneImpl::createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
@@ -167,13 +167,13 @@ static void find_common_ancestors(NetPoint* src, NetPoint* dst,
   NetZoneImpl* current = src->netzone();
   while (current != nullptr) {
     path_src.push_back(current);
   NetZoneImpl* current = src->netzone();
   while (current != nullptr) {
     path_src.push_back(current);
-    current = static_cast<NetZoneImpl*>(current->father());
+    current = static_cast<NetZoneImpl*>(current->getFather());
   }
   std::vector<NetZoneImpl*> path_dst;
   current = dst->netzone();
   while (current != nullptr) {
     path_dst.push_back(current);
   }
   std::vector<NetZoneImpl*> path_dst;
   current = dst->netzone();
   while (current != nullptr) {
     path_dst.push_back(current);
-    current = static_cast<NetZoneImpl*>(current->father());
+    current = static_cast<NetZoneImpl*>(current->getFather());
   }
 
   /* (3) find the common father.
   }
 
   /* (3) find the common father.
@@ -319,8 +319,8 @@ void NetZoneImpl::getGlobalRoute(routing::NetPoint* src, routing::NetPoint* dst,
   NetZoneImpl *src_ancestor;
   NetZoneImpl *dst_ancestor;
   find_common_ancestors(src, dst, &common_ancestor, &src_ancestor, &dst_ancestor);
   NetZoneImpl *src_ancestor;
   NetZoneImpl *dst_ancestor;
   find_common_ancestors(src, dst, &common_ancestor, &src_ancestor, &dst_ancestor);
-  XBT_DEBUG("elements_father: common ancestor '%s' src ancestor '%s' dst ancestor '%s'", common_ancestor->name(),
-            src_ancestor->name(), dst_ancestor->name());
+  XBT_DEBUG("elements_father: common ancestor '%s' src ancestor '%s' dst ancestor '%s'", common_ancestor->getCname(),
+            src_ancestor->getCname(), dst_ancestor->getCname());
 
   /* Check whether a direct bypass is defined. If so, use it and bail out */
   if (common_ancestor->getBypassRoute(src, dst, links, latency))
 
   /* Check whether a direct bypass is defined. If so, use it and bail out */
   if (common_ancestor->getBypassRoute(src, dst, links, latency))
index c8d4bae..d947b4a 100644 (file)
@@ -165,11 +165,11 @@ void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
 
   xbt_assert(src_as == dst_as,
              "Internal error: %s@%s and %s@%s are not in the same netzone as expected. Please report that bug.",
 
   xbt_assert(src_as == dst_as,
              "Internal error: %s@%s and %s@%s are not in the same netzone as expected. Please report that bug.",
-             src->cname(), src_as->name(), dst->cname(), dst_as->name());
+             src->cname(), src_as->getCname(), dst->cname(), dst_as->getCname());
 
   xbt_assert(this == dst_as, "Internal error: route destination %s@%s is not in netzone %s as expected (route source: "
                              "%s@%s). Please report that bug.",
 
   xbt_assert(this == dst_as, "Internal error: route destination %s@%s is not in netzone %s as expected (route source: "
                              "%s@%s). Please report that bug.",
-             src->cname(), dst->cname(), src_as->name(), dst_as->name(), name());
+             src->cname(), dst->cname(), src_as->getCname(), dst_as->getCname(), getCname());
 }
 void RoutedZone::addRouteCheckParams(sg_platf_route_cbarg_t route)
 {
 }
 void RoutedZone::addRouteCheckParams(sg_platf_route_cbarg_t route)
 {
index e2ec817..ddc4b6d 100644 (file)
@@ -78,8 +78,8 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba
   if (src->isNetZone()) {
     std::string srcName = "router_" + src->name();
     std::string dstName = "router_" + dst->name();
   if (src->isNetZone()) {
     std::string srcName = "router_" + src->name();
     std::string dstName = "router_" + dst->name();
-    route->gw_src       = simgrid::s4u::Engine::instance()->netpointByNameOrNull(srcName.c_str());
-    route->gw_dst       = simgrid::s4u::Engine::instance()->netpointByNameOrNull(dstName.c_str());
+    route->gw_src       = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(srcName.c_str());
+    route->gw_dst       = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(dstName.c_str());
   }
 
   /* Retrieve the private links */
   }
 
   /* Retrieve the private links */
index eaa7df9..0bcc7ea 100644 (file)
@@ -145,7 +145,7 @@ smx_actor_t MC_smx_simcall_get_issuer(s_smx_simcall_t const* req)
 const char* MC_smx_actor_get_host_name(smx_actor_t actor)
 {
   if (mc_model_checker == nullptr)
 const char* MC_smx_actor_get_host_name(smx_actor_t actor)
 {
   if (mc_model_checker == nullptr)
-    return actor->host->cname();
+    return actor->host->getCname();
 
   simgrid::mc::Process* process = &mc_model_checker->process();
 
 
   simgrid::mc::Process* process = &mc_model_checker->process();
 
@@ -165,7 +165,7 @@ const char* MC_smx_actor_get_host_name(smx_actor_t actor)
     ~fake_host() {}
   };
   fake_host foo;
     ~fake_host() {}
   };
   fake_host foo;
-  const size_t offset = (char*) &foo.host.name() - (char*) &foo.host;
+  const size_t offset = (char*)&foo.host.getName() - (char*)&foo.host;
 
   // Read the simgrid::xbt::string in the MCed process:
   simgrid::mc::ActorInformation* info     = actor_info_cast(actor);
 
   // Read the simgrid::xbt::string in the MCed process:
   simgrid::mc::ActorInformation* info     = actor_info_cast(actor);
index 9d695b5..21a1355 100644 (file)
@@ -12,7 +12,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_process, instr, "MSG process");
 
 char *instr_process_id (msg_process_t proc, char *str, int len)
 {
 
 char *instr_process_id (msg_process_t proc, char *str, int len)
 {
-  return instr_process_id_2 (proc->cname(), proc->pid(), str, len);
+  return instr_process_id_2(proc->getCname(), proc->getPid(), str, len);
 }
 
 char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len)
 }
 
 char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len)
@@ -59,7 +59,7 @@ void TRACE_msg_process_create (const char *process_name, int process_pid, msg_ho
     int len = INSTR_DEFAULT_STR_SIZE;
     char str[INSTR_DEFAULT_STR_SIZE];
 
     int len = INSTR_DEFAULT_STR_SIZE;
     char str[INSTR_DEFAULT_STR_SIZE];
 
-    container_t host_container = PJ_container_get(host->cname());
+    container_t host_container = PJ_container_get(host->getCname());
     PJ_container_new(instr_process_id_2(process_name, process_pid, str, len), INSTR_MSG_PROCESS, host_container);
   }
 }
     PJ_container_new(instr_process_id_2(process_name, process_pid, str, len), INSTR_MSG_PROCESS, host_container);
   }
 }
@@ -82,7 +82,7 @@ void TRACE_msg_process_kill(smx_process_exit_status_t status, msg_process_t proc
 {
   if (TRACE_msg_process_is_enabled() && status==SMX_EXIT_FAILURE){
     //kill means that this process no longer exists, let's destroy it
 {
   if (TRACE_msg_process_is_enabled() && status==SMX_EXIT_FAILURE){
     //kill means that this process no longer exists, let's destroy it
-    TRACE_msg_process_destroy(process->cname(), process->pid());
+    TRACE_msg_process_destroy(process->getCname(), process->getPid());
   }
 }
 
   }
 }
 
index 1a62573..1114b49 100644 (file)
@@ -38,29 +38,29 @@ void MSG_create_environment(const char *file)
 
 msg_netzone_t MSG_zone_get_root()
 {
 
 msg_netzone_t MSG_zone_get_root()
 {
-  return simgrid::s4u::Engine::instance()->netRoot();
+  return simgrid::s4u::Engine::getInstance()->getNetRoot();
 }
 
 const char* MSG_zone_get_name(msg_netzone_t netzone)
 {
 }
 
 const char* MSG_zone_get_name(msg_netzone_t netzone)
 {
-  return netzone->name();
+  return netzone->getCname();
 }
 
 msg_netzone_t MSG_zone_get_by_name(const char* name)
 {
 }
 
 msg_netzone_t MSG_zone_get_by_name(const char* name)
 {
-  return simgrid::s4u::Engine::instance()->netzoneByNameOrNull(name);
+  return simgrid::s4u::Engine::getInstance()->getNetzoneByNameOrNull(name);
 }
 
 void MSG_zone_get_sons(msg_netzone_t netzone, xbt_dict_t whereto)
 {
 }
 
 void MSG_zone_get_sons(msg_netzone_t netzone, xbt_dict_t whereto)
 {
-  for (auto elem : *netzone->children()) {
-    xbt_dict_set(whereto, elem->name(), static_cast<void*>(elem), nullptr);
+  for (auto elem : *netzone->getChildren()) {
+    xbt_dict_set(whereto, elem->getCname(), static_cast<void*>(elem), nullptr);
   }
 }
 
 const char* MSG_zone_get_property_value(msg_netzone_t netzone, const char* name)
 {
   }
 }
 
 const char* MSG_zone_get_property_value(msg_netzone_t netzone, const char* name)
 {
-  return netzone->property(name);
+  return netzone->getProperty(name);
 }
 
 void MSG_zone_set_property_value(msg_netzone_t netzone, const char* name, char* value)
 }
 
 void MSG_zone_set_property_value(msg_netzone_t netzone, const char* name, char* value)
@@ -72,7 +72,7 @@ void MSG_zone_get_hosts(msg_netzone_t netzone, xbt_dynar_t whereto)
 {
   /* converts vector to dynar */
   std::vector<simgrid::s4u::Host*> hosts;
 {
   /* converts vector to dynar */
   std::vector<simgrid::s4u::Host*> hosts;
-  netzone->hosts(&hosts);
+  netzone->getHosts(&hosts);
   for (auto host : hosts)
     xbt_dynar_push(whereto, &host);
 }
   for (auto host : hosts)
     xbt_dynar_push(whereto, &host);
 }
index bb023aa..53ea92d 100644 (file)
@@ -270,7 +270,7 @@ msg_error_t MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, d
   /* Try to receive it by calling SIMIX network layer */
   try {
     simcall_comm_recv(MSG_process_self()->getImpl(), mailbox->getImpl(), task, nullptr, nullptr, nullptr, nullptr, timeout, rate);
   /* Try to receive it by calling SIMIX network layer */
   try {
     simcall_comm_recv(MSG_process_self()->getImpl(), mailbox->getImpl(), task, nullptr, nullptr, nullptr, nullptr, timeout, rate);
-    XBT_DEBUG("Got task %s from %s",(*task)->name,mailbox->name());
+    XBT_DEBUG("Got task %s from %s", (*task)->name, mailbox->getName());
     (*task)->simdata->setNotUsed();
   }
   catch (xbt_ex& e) {
     (*task)->simdata->setNotUsed();
   }
   catch (xbt_ex& e) {
index 407e5a2..285d76a 100644 (file)
@@ -115,7 +115,7 @@ xbt_dynar_t MSG_hosts_as_dynar() {
  * \brief Return the speed of the processor (in flop/s), regardless of the current load on the machine.
  */
 double MSG_host_get_speed(msg_host_t host) {
  * \brief Return the speed of the processor (in flop/s), regardless of the current load on the machine.
  */
 double MSG_host_get_speed(msg_host_t host) {
-  return host->speed();
+  return host->getSpeed();
 }
 
 /** \ingroup m_host_management
 }
 
 /** \ingroup m_host_management
@@ -134,7 +134,7 @@ double MSG_get_host_speed(msg_host_t host) {
  * \return the number of cores
  */
 int MSG_host_get_core_number(msg_host_t host) {
  * \return the number of cores
  */
 int MSG_host_get_core_number(msg_host_t host) {
-  return host->coreCount();
+  return host->getCoreCount();
 }
 
 /** \ingroup m_host_management
 }
 
 /** \ingroup m_host_management
@@ -174,7 +174,7 @@ const char *MSG_host_get_property_value(msg_host_t host, const char *name)
 xbt_dict_t MSG_host_get_properties(msg_host_t host)
 {
   xbt_assert((host != nullptr), "Invalid parameters (host is nullptr)");
 xbt_dict_t MSG_host_get_properties(msg_host_t host)
 {
   xbt_assert((host != nullptr), "Invalid parameters (host is nullptr)");
-  return host->properties();
+  return host->getProperties();
 }
 
 /** \ingroup m_host_management
 }
 
 /** \ingroup m_host_management
@@ -264,7 +264,7 @@ xbt_dict_t MSG_host_get_storage_content(msg_host_t host)
 {
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t contents = xbt_dict_new_homogeneous(nullptr);
 {
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t contents = xbt_dict_new_homogeneous(nullptr);
-  for (auto elm : host->mountedStorages())
+  for (auto elm : host->getMountedStorages())
     xbt_dict_set(contents, elm.first.c_str(), MSG_storage_get_content(elm.second), nullptr);
 
   return contents;
     xbt_dict_set(contents, elm.first.c_str(), MSG_storage_get_content(elm.second), nullptr);
 
   return contents;
index 031d2dd..2c0b61b 100644 (file)
@@ -57,7 +57,7 @@ msg_error_t MSG_file_set_data(msg_file_t fd, void *data)
  */
 void* MSG_file_get_data(msg_file_t fd)
 {
  */
 void* MSG_file_get_data(msg_file_t fd)
 {
-  return fd->userdata();
+  return fd->getUserdata();
 }
 
 /** \ingroup msg_file
 }
 
 /** \ingroup msg_file
@@ -73,7 +73,7 @@ void MSG_file_dump (msg_file_t fd){
            "\t\tStorage Id: '%s'\n"
            "\t\tStorage Type: '%s'\n"
            "\t\tFile Descriptor Id: %d",
            "\t\tStorage Id: '%s'\n"
            "\t\tStorage Type: '%s'\n"
            "\t\tFile Descriptor Id: %d",
-           fd->path(), fd->size(), fd->mount_point.c_str(), fd->storageId, fd->storage_type, fd->desc_id);
+           fd->getPath(), fd->size(), fd->mount_point.c_str(), fd->storageId, fd->storage_type, fd->desc_id);
 }
 
 /** \ingroup msg_file
 }
 
 /** \ingroup msg_file
@@ -92,12 +92,12 @@ sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 
   /* Find the host where the file is physically located and read it */
   msg_storage_t storage_src           = simgrid::s4u::Storage::byName(fd->storageId);
 
   /* Find the host where the file is physically located and read it */
   msg_storage_t storage_src           = simgrid::s4u::Storage::byName(fd->storageId);
-  msg_host_t attached_host            = storage_src->host();
+  msg_host_t attached_host            = storage_src->getHost();
   read_size                           = fd->read(size); // TODO re-add attached_host;
 
   read_size                           = fd->read(size); // TODO re-add attached_host;
 
-  if (strcmp(attached_host->cname(), MSG_host_self()->cname())) {
+  if (strcmp(attached_host->getCname(), MSG_host_self()->getCname())) {
     /* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
     /* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
-    XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", attached_host->cname(), read_size);
+    XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", attached_host->getCname(), read_size);
     msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
     double flops_amount[]    = {0, 0};
     double bytes_amount[]    = {0, 0, static_cast<double>(read_size), 0};
     msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
     double flops_amount[]    = {0, 0};
     double bytes_amount[]    = {0, 0, static_cast<double>(read_size), 0};
@@ -109,7 +109,7 @@ sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 
     if(transfer != MSG_OK){
       if (transfer == MSG_HOST_FAILURE)
 
     if(transfer != MSG_OK){
       if (transfer == MSG_HOST_FAILURE)
-        XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->cname());
+        XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->getCname());
       if (transfer == MSG_TASK_CANCELED)
         XBT_WARN("Transfer error, task has been canceled!");
 
       if (transfer == MSG_TASK_CANCELED)
         XBT_WARN("Transfer error, task has been canceled!");
 
@@ -133,11 +133,11 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 
   /* Find the host where the file is physically located (remote or local)*/
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
 
   /* Find the host where the file is physically located (remote or local)*/
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
-  msg_host_t attached_host  = storage_src->host();
+  msg_host_t attached_host  = storage_src->getHost();
 
 
-  if (strcmp(attached_host->cname(), MSG_host_self()->cname())) {
+  if (strcmp(attached_host->getCname(), MSG_host_self()->getCname())) {
     /* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
     /* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
-    XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", attached_host->cname(), size);
+    XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", attached_host->getCname(), size);
     msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
     double flops_amount[]    = {0, 0};
     double bytes_amount[]    = {0, static_cast<double>(size), 0, 0};
     msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
     double flops_amount[]    = {0, 0};
     double bytes_amount[]    = {0, static_cast<double>(size), 0, 0};
@@ -149,7 +149,7 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 
     if(transfer != MSG_OK){
       if (transfer == MSG_HOST_FAILURE)
 
     if(transfer != MSG_OK){
       if (transfer == MSG_HOST_FAILURE)
-        XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->cname());
+        XBT_WARN("Transfer error, %s remote host just turned off!", attached_host->getCname());
       if (transfer == MSG_TASK_CANCELED)
         XBT_WARN("Transfer error, task has been canceled!");
 
       if (transfer == MSG_TASK_CANCELED)
         XBT_WARN("Transfer error, task has been canceled!");
 
@@ -202,7 +202,7 @@ msg_error_t MSG_file_unlink(msg_file_t fd)
 {
   /* Find the host where the file is physically located (remote or local)*/
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
 {
   /* Find the host where the file is physically located (remote or local)*/
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
-  msg_host_t attached_host  = storage_src->host();
+  msg_host_t attached_host  = storage_src->getHost();
   fd->unlink(attached_host);
   delete fd;
   return MSG_OK;
   fd->unlink(attached_host);
   delete fd;
   return MSG_OK;
@@ -252,7 +252,7 @@ sg_size_t MSG_file_tell(msg_file_t fd)
 
 const char *MSG_file_get_name(msg_file_t fd) {
   xbt_assert((fd != nullptr), "Invalid parameters");
 
 const char *MSG_file_get_name(msg_file_t fd) {
   xbt_assert((fd != nullptr), "Invalid parameters");
-  return fd->path();
+  return fd->getPath();
 }
 
 /**
 }
 
 /**
@@ -278,7 +278,7 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 {
   /* Find the host where the file is physically located and read it */
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(file->storageId);
 {
   /* Find the host where the file is physically located and read it */
   msg_storage_t storage_src = simgrid::s4u::Storage::byName(file->storageId);
-  msg_host_t src_host       = storage_src->host();
+  msg_host_t src_host       = storage_src->getHost();
   MSG_file_seek(file, 0, SEEK_SET);
   sg_size_t read_size = file->read(file->size());
 
   MSG_file_seek(file, 0, SEEK_SET);
   sg_size_t read_size = file->read(file->size());
 
@@ -287,7 +287,7 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
   msg_host_t dst_host;
   size_t longest_prefix_length = 0;
 
   msg_host_t dst_host;
   size_t longest_prefix_length = 0;
 
-  for (auto elm : host->mountedStorages()) {
+  for (auto elm : host->getMountedStorages()) {
     std::string mount_point = std::string(fullpath).substr(0, elm.first.size());
     if (mount_point == elm.first && elm.first.length() > longest_prefix_length) {
       /* The current mount name is found in the full path and is bigger than the previous*/
     std::string mount_point = std::string(fullpath).substr(0, elm.first.size());
     if (mount_point == elm.first && elm.first.length() > longest_prefix_length) {
       /* The current mount name is found in the full path and is bigger than the previous*/
@@ -298,14 +298,14 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 
   if (storage_dest != nullptr) {
     /* Mount point found, retrieve the host the storage is attached to */
 
   if (storage_dest != nullptr) {
     /* Mount point found, retrieve the host the storage is attached to */
-    dst_host = storage_dest->host();
+    dst_host = storage_dest->getHost();
   }else{
   }else{
-    XBT_WARN("Can't find mount point for '%s' on destination host '%s'", fullpath, host->cname());
+    XBT_WARN("Can't find mount point for '%s' on destination host '%s'", fullpath, host->getCname());
     return MSG_TASK_CANCELED;
   }
 
     return MSG_TASK_CANCELED;
   }
 
-  XBT_DEBUG("Initiate data transfer of %llu bytes between %s and %s.", read_size, src_host->cname(),
-            storage_dest->host()->cname());
+  XBT_DEBUG("Initiate data transfer of %llu bytes between %s and %s.", read_size, src_host->getCname(),
+            storage_dest->getHost()->getCname());
   msg_host_t m_host_list[] = {src_host, dst_host};
   double flops_amount[]    = {0, 0};
   double bytes_amount[]    = {0, static_cast<double>(read_size), 0, 0};
   msg_host_t m_host_list[] = {src_host, dst_host};
   double flops_amount[]    = {0, 0};
   double bytes_amount[]    = {0, static_cast<double>(read_size), 0, 0};
@@ -317,7 +317,7 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 
   if (err != MSG_OK) {
     if (err == MSG_HOST_FAILURE)
 
   if (err != MSG_OK) {
     if (err == MSG_HOST_FAILURE)
-      XBT_WARN("Transfer error, %s remote host just turned off!", storage_dest->host()->cname());
+      XBT_WARN("Transfer error, %s remote host just turned off!", storage_dest->getHost()->getCname());
     if (err == MSG_TASK_CANCELED)
       XBT_WARN("Transfer error, task has been canceled!");
 
     if (err == MSG_TASK_CANCELED)
       XBT_WARN("Transfer error, task has been canceled!");
 
@@ -360,7 +360,7 @@ msg_error_t MSG_file_rmove (msg_file_t file, msg_host_t host, const char* fullpa
 const char* MSG_storage_get_name(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
 const char* MSG_storage_get_name(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
-  return storage->name();
+  return storage->getName();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -370,7 +370,7 @@ const char* MSG_storage_get_name(msg_storage_t storage)
  */
 sg_size_t MSG_storage_get_free_size(msg_storage_t storage)
 {
  */
 sg_size_t MSG_storage_get_free_size(msg_storage_t storage)
 {
-  return storage->sizeFree();
+  return storage->getSizeFree();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -380,7 +380,7 @@ sg_size_t MSG_storage_get_free_size(msg_storage_t storage)
  */
 sg_size_t MSG_storage_get_used_size(msg_storage_t storage)
 {
  */
 sg_size_t MSG_storage_get_used_size(msg_storage_t storage)
 {
-  return storage->sizeUsed();
+  return storage->getSizeUsed();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -391,7 +391,7 @@ sg_size_t MSG_storage_get_used_size(msg_storage_t storage)
 xbt_dict_t MSG_storage_get_properties(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters (storage is nullptr)");
 xbt_dict_t MSG_storage_get_properties(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters (storage is nullptr)");
-  return storage->properties();
+  return storage->getProperties();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -415,7 +415,7 @@ void MSG_storage_set_property_value(msg_storage_t storage, const char* name, cha
  */
 const char *MSG_storage_get_property_value(msg_storage_t storage, const char *name)
 {
  */
 const char *MSG_storage_get_property_value(msg_storage_t storage, const char *name)
 {
-  return storage->property(name);
+  return storage->getProperty(name);
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -461,7 +461,7 @@ msg_error_t MSG_storage_set_data(msg_storage_t storage, void *data)
 void *MSG_storage_get_data(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
 void *MSG_storage_get_data(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
-  return storage->userdata();
+  return storage->getUserdata();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -472,7 +472,7 @@ void *MSG_storage_get_data(msg_storage_t storage)
  */
 xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
 {
  */
 xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
 {
-  std::map<std::string, sg_size_t>* content = storage->content();
+  std::map<std::string, sg_size_t>* content = storage->getContent();
   xbt_dict_t content_dict = xbt_dict_new_homogeneous(&free);
 
   for (auto entry : *content) {
   xbt_dict_t content_dict = xbt_dict_new_homogeneous(&free);
 
   for (auto entry : *content) {
@@ -491,7 +491,7 @@ xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
  */
 sg_size_t MSG_storage_get_size(msg_storage_t storage)
 {
  */
 sg_size_t MSG_storage_get_size(msg_storage_t storage)
 {
-  return storage->size();
+  return storage->getSize();
 }
 
 /** \ingroup msg_storage_management
 }
 
 /** \ingroup msg_storage_management
@@ -503,7 +503,7 @@ sg_size_t MSG_storage_get_size(msg_storage_t storage)
 const char* MSG_storage_get_host(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
 const char* MSG_storage_get_host(msg_storage_t storage)
 {
   xbt_assert((storage != nullptr), "Invalid parameters");
-  return storage->host()->cname();
+  return storage->getHost()->getCname();
 }
 
 SG_END_DECL()
 }
 
 SG_END_DECL()
index 24ae882..14d0097 100644 (file)
@@ -164,7 +164,7 @@ msg_process_t MSG_process_attach(const char *name, void *data, msg_host_t host,
 
   /* Let's create the process: SIMIX may decide to start it right now, even before returning the flow control to us */
   smx_actor_t process =
 
   /* Let's create the process: SIMIX may decide to start it right now, even before returning the flow control to us */
   smx_actor_t process =
-      SIMIX_process_attach(name, new simgrid::msg::ActorExt(data), host->cname(), properties, nullptr);
+      SIMIX_process_attach(name, new simgrid::msg::ActorExt(data), host->getCname(), properties, nullptr);
   if (not process)
     xbt_die("Could not attach");
   simcall_process_on_exit(process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,process);
   if (not process)
     xbt_die("Could not attach");
   simcall_process_on_exit(process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,process);
@@ -343,7 +343,7 @@ int MSG_process_get_PPID(msg_process_t process)
  */
 const char *MSG_process_get_name(msg_process_t process)
 {
  */
 const char *MSG_process_get_name(msg_process_t process)
 {
-  return process->cname();
+  return process->getCname();
 }
 
 /** \ingroup m_process_management
 }
 
 /** \ingroup m_process_management
index 4f725e7..cc2d536 100644 (file)
@@ -52,7 +52,7 @@ void MSG_vm_set_params(msg_vm_t vm, vm_params_t params)
  */
 void MSG_vm_get_params(msg_vm_t vm, vm_params_t params)
 {
  */
 void MSG_vm_get_params(msg_vm_t vm, vm_params_t params)
 {
-  static_cast<simgrid::s4u::VirtualMachine*>(vm)->parameters(params);
+  static_cast<simgrid::s4u::VirtualMachine*>(vm)->getParameters(params);
 }
 
 /* **** Check state of a VM **** */
 }
 
 /* **** Check state of a VM **** */
@@ -158,7 +158,7 @@ msg_vm_t MSG_vm_create_multicore(msg_host_t pm, const char* name, int coreAmount
 void MSG_vm_destroy(msg_vm_t vm)
 {
   if (MSG_vm_is_migrating(vm))
 void MSG_vm_destroy(msg_vm_t vm)
 {
   if (MSG_vm_is_migrating(vm))
-    THROWF(vm_error, 0, "Cannot destroy VM '%s', which is migrating.", vm->cname());
+    THROWF(vm_error, 0, "Cannot destroy VM '%s', which is migrating.", vm->getCname());
 
   /* First, terminate all processes on the VM if necessary */
   if (MSG_vm_is_running(vm))
 
   /* First, terminate all processes on the VM if necessary */
   if (MSG_vm_is_running(vm))
@@ -170,7 +170,7 @@ void MSG_vm_destroy(msg_vm_t vm)
   });
 
   if (TRACE_msg_vm_is_enabled()) {
   });
 
   if (TRACE_msg_vm_is_enabled()) {
-    container_t container = PJ_container_get(vm->cname());
+    container_t container = PJ_container_get(vm->getCname());
     PJ_container_remove_from_parent(container);
     PJ_container_free(container);
   }
     PJ_container_remove_from_parent(container);
     PJ_container_free(container);
   }
@@ -204,8 +204,8 @@ void MSG_vm_start(msg_vm_t vm)
 
       if (vm_ramsize > pm_ramsize - total_ramsize_of_vms) {
         XBT_WARN("cannnot start %s@%s due to memory shortage: vm_ramsize %ld, free %ld, pm_ramsize %ld (bytes).",
 
       if (vm_ramsize > pm_ramsize - total_ramsize_of_vms) {
         XBT_WARN("cannnot start %s@%s due to memory shortage: vm_ramsize %ld, free %ld, pm_ramsize %ld (bytes).",
-                 vm->cname(), pm->cname(), vm_ramsize, pm_ramsize - total_ramsize_of_vms, pm_ramsize);
-        THROWF(vm_error, 0, "Memory shortage on host '%s', VM '%s' cannot be started", pm->cname(), vm->cname());
+                 vm->getCname(), pm->getCname(), vm_ramsize, pm_ramsize - total_ramsize_of_vms, pm_ramsize);
+        THROWF(vm_error, 0, "Memory shortage on host '%s', VM '%s' cannot be started", pm->getCname(), vm->getCname());
       }
     }
 
       }
     }
 
@@ -213,7 +213,7 @@ void MSG_vm_start(msg_vm_t vm)
   });
 
   if (TRACE_msg_vm_is_enabled()) {
   });
 
   if (TRACE_msg_vm_is_enabled()) {
-    container_t vm_container = PJ_container_get(vm->cname());
+    container_t vm_container = PJ_container_get(vm->getCname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("start", "0 0 1", type); // start is blue
     new PushStateEvent(MSG_get_clock(), vm_container, type, value);
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("start", "0 0 1", type); // start is blue
     new PushStateEvent(MSG_get_clock(), vm_container, type, value);
@@ -241,17 +241,17 @@ void MSG_vm_shutdown(msg_vm_t vm)
 
 static inline char *get_mig_process_tx_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 {
 
 static inline char *get_mig_process_tx_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 {
-  return bprintf("__pr_mig_tx:%s(%s-%s)", vm->cname(), src_pm->cname(), dst_pm->cname());
+  return bprintf("__pr_mig_tx:%s(%s-%s)", vm->getCname(), src_pm->getCname(), dst_pm->getCname());
 }
 
 static inline char *get_mig_process_rx_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 {
 }
 
 static inline char *get_mig_process_rx_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 {
-  return bprintf("__pr_mig_rx:%s(%s-%s)", vm->cname(), src_pm->cname(), dst_pm->cname());
+  return bprintf("__pr_mig_rx:%s(%s-%s)", vm->getCname(), src_pm->getCname(), dst_pm->getCname());
 }
 
 static inline char *get_mig_task_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, int stage)
 {
 }
 
 static inline char *get_mig_task_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, int stage)
 {
-  return bprintf("__task_mig_stage%d:%s(%s-%s)", stage, vm->cname(), src_pm->cname(), dst_pm->cname());
+  return bprintf("__task_mig_stage%d:%s(%s-%s)", stage, vm->getCname(), src_pm->getCname(), dst_pm->getCname());
 }
 
 struct migration_session {
 }
 
 struct migration_session {
@@ -317,7 +317,7 @@ static int migration_rx_fun(int argc, char *argv[])
 
   // Now the VM is running on the new host (the migration is completed) (even if the SRC crash)
   vm->pimpl_vm_->isMigrating = false;
 
   // Now the VM is running on the new host (the migration is completed) (even if the SRC crash)
   vm->pimpl_vm_->isMigrating = false;
-  XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", ms->vm->cname(), ms->src_pm->cname(), ms->dst_pm->cname());
+  XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", ms->vm->getCname(), ms->src_pm->getCname(), ms->dst_pm->getCname());
 
   if (TRACE_msg_vm_is_enabled()) {
     static long long int counter = 0;
 
   if (TRACE_msg_vm_is_enabled()) {
     static long long int counter = 0;
@@ -326,20 +326,20 @@ static int migration_rx_fun(int argc, char *argv[])
     counter++;
 
     // start link
     counter++;
 
     // start link
-    container_t msg = PJ_container_get(vm->cname());
+    container_t msg = PJ_container_get(vm->getCname());
     type_t type     = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
 
     // destroy existing container of this vm
     type_t type     = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
 
     // destroy existing container of this vm
-    container_t existing_container = PJ_container_get(vm->cname());
+    container_t existing_container = PJ_container_get(vm->getCname());
     PJ_container_remove_from_parent(existing_container);
     PJ_container_free(existing_container);
 
     // create new container on the new_host location
     PJ_container_remove_from_parent(existing_container);
     PJ_container_free(existing_container);
 
     // create new container on the new_host location
-    PJ_container_new(vm->cname(), INSTR_MSG_VM, PJ_container_get(ms->dst_pm->cname()));
+    PJ_container_new(vm->getCname(), INSTR_MSG_VM, PJ_container_get(ms->dst_pm->getCname()));
 
     // end link
 
     // end link
-    msg  = PJ_container_get(vm->cname());
+    msg  = PJ_container_get(vm->getCname());
     type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     new EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
   }
     type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     new EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
   }
@@ -394,7 +394,7 @@ static double get_computed(char *key, msg_vm_t vm, dirty_page_t dp, double remai
   double computed = dp->prev_remaining - remaining;
   double duration = clock - dp->prev_clock;
 
   double computed = dp->prev_remaining - remaining;
   double duration = clock - dp->prev_clock;
 
-  XBT_DEBUG("%s@%s: computed %f ops (remaining %f -> %f) in %f secs (%f -> %f)", key, vm->cname(), computed,
+  XBT_DEBUG("%s@%s: computed %f ops (remaining %f -> %f) in %f secs (%f -> %f)", key, vm->getCname(), computed,
             dp->prev_remaining, remaining, duration, dp->prev_clock, clock);
 
   return computed;
             dp->prev_remaining, remaining, duration, dp->prev_clock, clock);
 
   return computed;
@@ -453,7 +453,7 @@ void MSG_host_add_task(msg_host_t host, msg_task_t task)
     pimpl->dp_objs = xbt_dict_new_homogeneous(nullptr);
   xbt_assert(xbt_dict_get_or_null(pimpl->dp_objs, key) == nullptr);
   xbt_dict_set(pimpl->dp_objs, key, dp, nullptr);
     pimpl->dp_objs = xbt_dict_new_homogeneous(nullptr);
   xbt_assert(xbt_dict_get_or_null(pimpl->dp_objs, key) == nullptr);
   xbt_dict_set(pimpl->dp_objs, key, dp, nullptr);
-  XBT_DEBUG("add %s on %s (remaining %f, dp_enabled %d)", key, host->cname(), remaining, pimpl->dp_enabled);
+  XBT_DEBUG("add %s on %s (remaining %f, dp_enabled %d)", key, host->getCname(), remaining, pimpl->dp_enabled);
 
   xbt_free(key);
 }
 
   xbt_free(key);
 }
@@ -483,7 +483,7 @@ void MSG_host_del_task(msg_host_t host, msg_task_t task)
     xbt_dict_remove(pimpl->dp_objs, key);
   xbt_free(dp);
 
     xbt_dict_remove(pimpl->dp_objs, key);
   xbt_free(dp);
 
-  XBT_DEBUG("del %s on %s", key, host->cname());
+  XBT_DEBUG("del %s on %s", key, host->getCname());
   xbt_free(key);
 }
 
   xbt_free(key);
 }
 
@@ -514,13 +514,13 @@ static sg_size_t send_migration_data(msg_vm_t vm, msg_host_t src_pm, msg_host_t
 
   /* FIXME: why try-and-catch is used here? */
   if(ret == MSG_HOST_FAILURE){
 
   /* FIXME: why try-and-catch is used here? */
   if(ret == MSG_HOST_FAILURE){
-    XBT_DEBUG("SRC host failed during migration of %s (stage %d)", vm->cname(), stage);
+    XBT_DEBUG("SRC host failed during migration of %s (stage %d)", vm->getCname(), stage);
     MSG_task_destroy(task);
     MSG_task_destroy(task);
-    THROWF(host_error, 0, "SRC host failed during migration of %s (stage %d)", vm->cname(), stage);
+    THROWF(host_error, 0, "SRC host failed during migration of %s (stage %d)", vm->getCname(), stage);
   }else if(ret == MSG_TRANSFER_FAILURE){
   }else if(ret == MSG_TRANSFER_FAILURE){
-    XBT_DEBUG("DST host failed during migration of %s (stage %d)", vm->cname(), stage);
+    XBT_DEBUG("DST host failed during migration of %s (stage %d)", vm->getCname(), stage);
     MSG_task_destroy(task);
     MSG_task_destroy(task);
-    THROWF(host_error, 0, "DST host failed during migration of %s (stage %d)", vm->cname(), stage);
+    THROWF(host_error, 0, "DST host failed during migration of %s (stage %d)", vm->getCname(), stage);
   }
 
   double clock_end = MSG_get_clock();
   }
 
   double clock_end = MSG_get_clock();
@@ -559,7 +559,7 @@ static int migration_tx_fun(int argc, char *argv[])
 
   double host_speed = MSG_host_get_speed(MSG_vm_get_pm(ms->vm));
   s_vm_params_t params;
 
   double host_speed = MSG_host_get_speed(MSG_vm_get_pm(ms->vm));
   s_vm_params_t params;
-  static_cast<simgrid::s4u::VirtualMachine*>(ms->vm)->parameters(&params);
+  static_cast<simgrid::s4u::VirtualMachine*>(ms->vm)->getParameters(&params);
   const sg_size_t ramsize   = params.ramsize;
   const sg_size_t devsize   = params.devsize;
   const int skip_stage1     = params.skip_stage1;
   const sg_size_t ramsize   = params.ramsize;
   const sg_size_t devsize   = params.devsize;
   const int skip_stage1     = params.skip_stage1;
@@ -746,13 +746,13 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t dst_pm)
   msg_host_t src_pm                      = pimpl->getPm();
 
   if (src_pm->isOff())
   msg_host_t src_pm                      = pimpl->getPm();
 
   if (src_pm->isOff())
-    THROWF(vm_error, 0, "Cannot migrate VM '%s' from host '%s', which is offline.", vm->cname(), src_pm->cname());
+    THROWF(vm_error, 0, "Cannot migrate VM '%s' from host '%s', which is offline.", vm->getCname(), src_pm->getCname());
   if (dst_pm->isOff())
   if (dst_pm->isOff())
-    THROWF(vm_error, 0, "Cannot migrate VM '%s' to host '%s', which is offline.", vm->cname(), dst_pm->cname());
+    THROWF(vm_error, 0, "Cannot migrate VM '%s' to host '%s', which is offline.", vm->getCname(), dst_pm->getCname());
   if (not MSG_vm_is_running(vm))
   if (not MSG_vm_is_running(vm))
-    THROWF(vm_error, 0, "Cannot migrate VM '%s' that is not running yet.", vm->cname());
+    THROWF(vm_error, 0, "Cannot migrate VM '%s' that is not running yet.", vm->getCname());
   if (typedVm->isMigrating())
   if (typedVm->isMigrating())
-    THROWF(vm_error, 0, "Cannot migrate VM '%s' that is already migrating.", vm->cname());
+    THROWF(vm_error, 0, "Cannot migrate VM '%s' that is already migrating.", vm->getCname());
 
   pimpl->isMigrating = true;
 
 
   pimpl->isMigrating = true;
 
@@ -763,8 +763,8 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t dst_pm)
 
   /* We have two mailboxes. mbox is used to transfer migration data between source and destination PMs. mbox_ctl is used
    * to detect the completion of a migration. The names of these mailboxes must not conflict with others. */
 
   /* We have two mailboxes. mbox is used to transfer migration data between source and destination PMs. mbox_ctl is used
    * to detect the completion of a migration. The names of these mailboxes must not conflict with others. */
-  ms->mbox_ctl = bprintf("__mbox_mig_ctl:%s(%s-%s)", vm->cname(), src_pm->cname(), dst_pm->cname());
-  ms->mbox     = bprintf("__mbox_mig_src_dst:%s(%s-%s)", vm->cname(), src_pm->cname(), dst_pm->cname());
+  ms->mbox_ctl = bprintf("__mbox_mig_ctl:%s(%s-%s)", vm->getCname(), src_pm->getCname(), dst_pm->getCname());
+  ms->mbox     = bprintf("__mbox_mig_src_dst:%s(%s-%s)", vm->getCname(), src_pm->getCname(), dst_pm->getCname());
 
   char *pr_rx_name = get_mig_process_rx_name(vm, src_pm, dst_pm);
   char *pr_tx_name = get_mig_process_tx_name(vm, src_pm, dst_pm);
 
   char *pr_rx_name = get_mig_process_rx_name(vm, src_pm, dst_pm);
   char *pr_tx_name = get_mig_process_tx_name(vm, src_pm, dst_pm);
@@ -796,12 +796,13 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t dst_pm)
     XBT_ERROR("SRC crashes, throw an exception (m-control)");
     // MSG_process_kill(tx_process); // Adrien, I made a merge on Nov 28th 2014, I'm not sure whether this line is
     // required or not
     XBT_ERROR("SRC crashes, throw an exception (m-control)");
     // MSG_process_kill(tx_process); // Adrien, I made a merge on Nov 28th 2014, I'm not sure whether this line is
     // required or not
-    THROWF(host_error, 0, "Source host '%s' failed during the migration of VM '%s'.", src_pm->cname(), vm->cname());
+    THROWF(host_error, 0, "Source host '%s' failed during the migration of VM '%s'.", src_pm->getCname(),
+           vm->getCname());
   } else if ((ret == MSG_TRANSFER_FAILURE) || (ret == MSG_TIMEOUT)) {
     // MSG_TIMEOUT here means that MSG_host_is_avail() returned false.
     XBT_ERROR("DST crashes, throw an exception (m-control)");
   } else if ((ret == MSG_TRANSFER_FAILURE) || (ret == MSG_TIMEOUT)) {
     // MSG_TIMEOUT here means that MSG_host_is_avail() returned false.
     XBT_ERROR("DST crashes, throw an exception (m-control)");
-    THROWF(host_error, 0, "Destination host '%s' failed during the migration of VM '%s'.", dst_pm->cname(),
-           vm->cname());
+    THROWF(host_error, 0, "Destination host '%s' failed during the migration of VM '%s'.", dst_pm->getCname(),
+           vm->getCname());
   }
 
   char* expected_task_name = get_mig_task_name(vm, src_pm, dst_pm, 4);
   }
 
   char* expected_task_name = get_mig_task_name(vm, src_pm, dst_pm, 4);
@@ -828,7 +829,7 @@ void MSG_vm_suspend(msg_vm_t vm)
   XBT_DEBUG("vm_suspend done");
 
   if (TRACE_msg_vm_is_enabled()) {
   XBT_DEBUG("vm_suspend done");
 
   if (TRACE_msg_vm_is_enabled()) {
-    container_t vm_container = PJ_container_get(vm->cname());
+    container_t vm_container = PJ_container_get(vm->getCname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("suspend", "1 0 0", type); // suspend is red
     new PushStateEvent(MSG_get_clock(), vm_container, type, value);
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("suspend", "1 0 0", type); // suspend is red
     new PushStateEvent(MSG_get_clock(), vm_container, type, value);
@@ -845,7 +846,7 @@ void MSG_vm_resume(msg_vm_t vm)
   static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->resume();
 
   if (TRACE_msg_vm_is_enabled()) {
   static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->resume();
 
   if (TRACE_msg_vm_is_enabled()) {
-    container_t vm_container = PJ_container_get(vm->cname());
+    container_t vm_container = PJ_container_get(vm->getCname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     new PopStateEvent(MSG_get_clock(), vm_container, type);
   }
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     new PopStateEvent(MSG_get_clock(), vm_container, type);
   }
@@ -856,7 +857,7 @@ void MSG_vm_resume(msg_vm_t vm)
  */
 msg_host_t MSG_vm_get_pm(msg_vm_t vm)
 {
  */
 msg_host_t MSG_vm_get_pm(msg_vm_t vm)
 {
-  return static_cast<simgrid::s4u::VirtualMachine*>(vm)->pm();
+  return static_cast<simgrid::s4u::VirtualMachine*>(vm)->getPm();
 }
 
 /** @brief Set a CPU bound for a given VM.
 }
 
 /** @brief Set a CPU bound for a given VM.
index ec2c146..304a07f 100644 (file)
@@ -77,7 +77,7 @@ double VMModel::nextOccuringEvent(double now)
 
     double solved_value = ws_vm->pimpl_vm_->action_->getVariable()
                               ->value; // this is X1 in comment above, what this VM got in the sharing on the PM
 
     double solved_value = ws_vm->pimpl_vm_->action_->getVariable()
                               ->value; // this is X1 in comment above, what this VM got in the sharing on the PM
-    XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->cname(), ws_vm->pimpl_vm_->getPm()->cname());
+    XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->getCname(), ws_vm->pimpl_vm_->getPm()->getCname());
 
     // TODO: check lmm_update_constraint_bound() works fine instead of the below manual substitution.
     // cpu_cas01->constraint->bound = solved_value;
 
     // TODO: check lmm_update_constraint_bound() works fine instead of the below manual substitution.
     // cpu_cas01->constraint->bound = solved_value;
@@ -111,7 +111,7 @@ VirtualMachineImpl::VirtualMachineImpl(simgrid::s4u::VirtualMachine* piface, sim
   /* Initialize the VM parameters */
   params_.ramsize = 0;
 
   /* Initialize the VM parameters */
   params_.ramsize = 0;
 
-  XBT_VERB("Create VM(%s)@PM(%s)", piface->cname(), hostPM_->cname());
+  XBT_VERB("Create VM(%s)@PM(%s)", piface->getCname(), hostPM_->getCname());
 }
 
 extern "C" int
 }
 
 extern "C" int
@@ -159,14 +159,14 @@ void VirtualMachineImpl::setState(e_surf_vm_state_t state)
 void VirtualMachineImpl::suspend(smx_actor_t issuer)
 {
   if (isMigrating)
 void VirtualMachineImpl::suspend(smx_actor_t issuer)
 {
   if (isMigrating)
-    THROWF(vm_error, 0, "Cannot suspend VM '%s': it is migrating", piface_->cname());
+    THROWF(vm_error, 0, "Cannot suspend VM '%s': it is migrating", piface_->getCname());
   if (getState() != SURF_VM_STATE_RUNNING)
   if (getState() != SURF_VM_STATE_RUNNING)
-    THROWF(vm_error, 0, "Cannot suspend VM %s: it is not running.", piface_->cname());
+    THROWF(vm_error, 0, "Cannot suspend VM %s: it is not running.", piface_->getCname());
   if (issuer->host == piface_)
   if (issuer->host == piface_)
-    THROWF(vm_error, 0, "Actor %s cannot suspend the VM %s in which it runs", issuer->cname(), piface_->cname());
+    THROWF(vm_error, 0, "Actor %s cannot suspend the VM %s in which it runs", issuer->cname(), piface_->getCname());
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
-  XBT_DEBUG("suspend VM(%s), where %d processes exist", piface_->cname(), xbt_swag_size(process_list));
+  XBT_DEBUG("suspend VM(%s), where %d processes exist", piface_->getCname(), xbt_swag_size(process_list));
 
   action_->suspend();
 
 
   action_->suspend();
 
@@ -185,10 +185,10 @@ void VirtualMachineImpl::suspend(smx_actor_t issuer)
 void VirtualMachineImpl::resume()
 {
   if (getState() != SURF_VM_STATE_SUSPENDED)
 void VirtualMachineImpl::resume()
 {
   if (getState() != SURF_VM_STATE_SUSPENDED)
-    THROWF(vm_error, 0, "Cannot resume VM %s: it was not suspended", piface_->cname());
+    THROWF(vm_error, 0, "Cannot resume VM %s: it was not suspended", piface_->getCname());
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
-  XBT_DEBUG("Resume VM %s, containing %d processes.", piface_->cname(), xbt_swag_size(process_list));
+  XBT_DEBUG("Resume VM %s, containing %d processes.", piface_->getCname(), xbt_swag_size(process_list));
 
   action_->resume();
 
 
   action_->resume();
 
@@ -227,11 +227,11 @@ void VirtualMachineImpl::shutdown(smx_actor_t issuer)
         THROW_IMPOSSIBLE;
         break;
     }
         THROW_IMPOSSIBLE;
         break;
     }
-    XBT_VERB("Shuting down the VM %s even if it's not running but %s", piface_->cname(), stateName);
+    XBT_VERB("Shuting down the VM %s even if it's not running but %s", piface_->getCname(), stateName);
   }
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
   }
 
   xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
-  XBT_DEBUG("shutdown VM %s, that contains %d processes", piface_->cname(), xbt_swag_size(process_list));
+  XBT_DEBUG("shutdown VM %s, that contains %d processes", piface_->getCname(), xbt_swag_size(process_list));
 
   smx_actor_t smx_process;
   smx_actor_t smx_process_safe;
 
   smx_actor_t smx_process;
   smx_actor_t smx_process_safe;
@@ -257,9 +257,9 @@ s4u::Host* VirtualMachineImpl::getPm()
  */
 void VirtualMachineImpl::setPm(s4u::Host* destination)
 {
  */
 void VirtualMachineImpl::setPm(s4u::Host* destination)
 {
-  const char* vm_name     = piface_->cname();
-  const char* pm_name_src = hostPM_->cname();
-  const char* pm_name_dst = destination->cname();
+  const char* vm_name     = piface_->getCname();
+  const char* pm_name_src = hostPM_->getCname();
+  const char* pm_name_dst = destination->getCname();
 
   /* update net_elm with that of the destination physical host */
   piface_->pimpl_netpoint = destination->pimpl_netpoint;
 
   /* update net_elm with that of the destination physical host */
   piface_->pimpl_netpoint = destination->pimpl_netpoint;
index ebae51c..c874d48 100644 (file)
@@ -31,7 +31,7 @@ VirtualMachine::VirtualMachine(const char* name, s4u::Host* pm, int coreAmount)
   extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
 
   if (TRACE_msg_vm_is_enabled()) {
   extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
 
   if (TRACE_msg_vm_is_enabled()) {
-    container_t host_container = PJ_container_get(pm->cname());
+    container_t host_container = PJ_container_get(pm->getCname());
     PJ_container_new(name, INSTR_MSG_VM, host_container);
   }
 }
     PJ_container_new(name, INSTR_MSG_VM, host_container);
   }
 }
@@ -40,7 +40,7 @@ VirtualMachine::~VirtualMachine()
 {
   onDestruction(*this);
 
 {
   onDestruction(*this);
 
-  XBT_DEBUG("destroy %s", cname());
+  XBT_DEBUG("destroy %s", getCname());
 
   /* FIXME: this is really strange that everything fails if the next line is removed.
    * This is as if we shared these data with the PM, which definitely should not be the case...
 
   /* FIXME: this is really strange that everything fails if the next line is removed.
    * This is as if we shared these data with the PM, which definitely should not be the case...
@@ -62,7 +62,7 @@ double VirtualMachine::getRamsize()
 {
   return pimpl_vm_->params_.ramsize;
 }
 {
   return pimpl_vm_->params_.ramsize;
 }
-simgrid::s4u::Host* VirtualMachine::pm()
+simgrid::s4u::Host* VirtualMachine::getPm()
 {
   return pimpl_vm_->getPm();
 }
 {
   return pimpl_vm_->getPm();
 }
@@ -73,7 +73,7 @@ e_surf_vm_state_t VirtualMachine::getState()
 
 /** @brief Retrieve a copy of the parameters of that VM/PM
  *  @details The ramsize and overcommit fields are used on the PM too */
 
 /** @brief Retrieve a copy of the parameters of that VM/PM
  *  @details The ramsize and overcommit fields are used on the PM too */
-void VirtualMachine::parameters(vm_params_t params)
+void VirtualMachine::getParameters(vm_params_t params)
 {
   pimpl_vm_->getParams(params);
 }
 {
   pimpl_vm_->getParams(params);
 }
index 81d3323..b8c5c27 100644 (file)
@@ -75,7 +75,7 @@ void Actor::migrate(Host* new_host)
   simgrid::simix::kernelImmediate([this, new_host]() { pimpl_->new_host = new_host; });
 }
 
   simgrid::simix::kernelImmediate([this, new_host]() { pimpl_->new_host = new_host; });
 }
 
-s4u::Host* Actor::host()
+s4u::Host* Actor::getHost()
 {
   return this->pimpl_->host;
 }
 {
   return this->pimpl_->host;
 }
@@ -85,22 +85,22 @@ void Actor::daemonize()
   simgrid::simix::kernelImmediate([this]() { pimpl_->daemonize(); });
 }
 
   simgrid::simix::kernelImmediate([this]() { pimpl_->daemonize(); });
 }
 
-const char* Actor::cname()
+const char* Actor::getCname()
 {
   return this->pimpl_->name.c_str();
 }
 
 {
   return this->pimpl_->name.c_str();
 }
 
-simgrid::xbt::string Actor::name()
+simgrid::xbt::string Actor::getName()
 {
   return this->pimpl_->name;
 }
 
 {
   return this->pimpl_->name;
 }
 
-aid_t Actor::pid()
+aid_t Actor::getPid()
 {
   return this->pimpl_->pid;
 }
 
 {
   return this->pimpl_->pid;
 }
 
-aid_t Actor::ppid()
+aid_t Actor::getPpid()
 {
   return this->pimpl_->ppid;
 }
 {
   return this->pimpl_->ppid;
 }
@@ -125,7 +125,7 @@ void Actor::setKillTime(double time) {
 }
 
 /** \brief Get the kill time of an actor(or 0 if unset). */
 }
 
 /** \brief Get the kill time of an actor(or 0 if unset). */
-double Actor::killTime()
+double Actor::getKillTime()
 {
   return SIMIX_timer_get_date(pimpl_->kill_timer);
 }
 {
   return SIMIX_timer_get_date(pimpl_->kill_timer);
 }
@@ -172,7 +172,7 @@ void Actor::killAll(int resetPid)
 }
 
 /** Retrieve the property value (or nullptr if not set) */
 }
 
 /** Retrieve the property value (or nullptr if not set) */
-const char* Actor::property(const char* key)
+const char* Actor::getProperty(const char* key)
 {
   return (char*)xbt_dict_get_or_null(simcall_process_get_properties(pimpl_), key);
 }
 {
   return (char*)xbt_dict_get_or_null(simcall_process_get_properties(pimpl_), key);
 }
@@ -250,22 +250,22 @@ CommPtr irecv(MailboxPtr chan, void** data)
   return chan->get_async(data);
 }
 
   return chan->get_async(data);
 }
 
-aid_t pid()
+aid_t getPid()
 {
   return SIMIX_process_self()->pid;
 }
 
 {
   return SIMIX_process_self()->pid;
 }
 
-aid_t ppid()
+aid_t getPpid()
 {
   return SIMIX_process_self()->ppid;
 }
 
 {
   return SIMIX_process_self()->ppid;
 }
 
-std::string name()
+std::string getName()
 {
   return SIMIX_process_self()->name;
 }
 
 {
   return SIMIX_process_self()->name;
 }
 
-Host* host()
+Host* getHost()
 {
   return SIMIX_process_self()->host;
 }
 {
   return SIMIX_process_self()->host;
 }
index 95a5a87..abc76c9 100644 (file)
@@ -165,7 +165,7 @@ bool Comm::test()
   return false;
 }
 
   return false;
 }
 
-MailboxPtr Comm::mailbox()
+MailboxPtr Comm::getMailbox()
 {
   return mailbox_;
 }
 {
   return mailbox_;
 }
index 64bb882..2e7de0a 100644 (file)
@@ -45,7 +45,8 @@ Engine::~Engine()
   s4u::Engine::instance_ = nullptr;
 }
 
   s4u::Engine::instance_ = nullptr;
 }
 
-Engine *Engine::instance() {
+Engine* Engine::getInstance()
+{
   if (s4u::Engine::instance_ == nullptr)
     new Engine(0,nullptr);
   return s4u::Engine::instance_;
   if (s4u::Engine::instance_ == nullptr)
     new Engine(0,nullptr);
   return s4u::Engine::instance_;
@@ -80,12 +81,12 @@ void Engine::loadDeployment(const char *deploy)
 // FIXME: The following duplicates the content of s4u::Host
 extern std::map<std::string, simgrid::s4u::Host*> host_list;
 /** @brief Returns the amount of hosts in the platform */
 // FIXME: The following duplicates the content of s4u::Host
 extern std::map<std::string, simgrid::s4u::Host*> host_list;
 /** @brief Returns the amount of hosts in the platform */
-size_t Engine::hostCount()
+size_t Engine::getHostCount()
 {
   return host_list.size();
 }
 /** @brief Fills the passed list with all hosts found in the platform */
 {
   return host_list.size();
 }
 /** @brief Fills the passed list with all hosts found in the platform */
-void Engine::hostList(std::vector<Host*>* list)
+void Engine::getHostList(std::vector<Host*>* list)
 {
   for (auto kv : host_list)
     list->push_back(kv.second);
 {
   for (auto kv : host_list)
     list->push_back(kv.second);
@@ -99,17 +100,17 @@ void Engine::run() {
   }
 }
 
   }
 }
 
-s4u::NetZone* Engine::netRoot()
+s4u::NetZone* Engine::getNetRoot()
 {
   return pimpl->netRoot_;
 }
 
 static s4u::NetZone* netzoneByNameRecursive(s4u::NetZone* current, const char* name)
 {
 {
   return pimpl->netRoot_;
 }
 
 static s4u::NetZone* netzoneByNameRecursive(s4u::NetZone* current, const char* name)
 {
-  if (not strcmp(current->name(), name))
+  if (not strcmp(current->getCname(), name))
     return current;
 
     return current;
 
-  for (auto elem : *(current->children())) {
+  for (auto elem : *(current->getChildren())) {
     simgrid::s4u::NetZone* tmp = netzoneByNameRecursive(elem, name);
     if (tmp != nullptr) {
       return tmp;
     simgrid::s4u::NetZone* tmp = netzoneByNameRecursive(elem, name);
     if (tmp != nullptr) {
       return tmp;
@@ -119,20 +120,20 @@ static s4u::NetZone* netzoneByNameRecursive(s4u::NetZone* current, const char* n
 }
 
 /** @brief Retrieve the NetZone of the given name (or nullptr if not found) */
 }
 
 /** @brief Retrieve the NetZone of the given name (or nullptr if not found) */
-NetZone* Engine::netzoneByNameOrNull(const char* name)
+NetZone* Engine::getNetzoneByNameOrNull(const char* name)
 {
 {
-  return netzoneByNameRecursive(netRoot(), name);
+  return netzoneByNameRecursive(getNetRoot(), name);
 }
 
 /** @brief Retrieve the netpoint of the given name (or nullptr if not found) */
 }
 
 /** @brief Retrieve the netpoint of the given name (or nullptr if not found) */
-simgrid::kernel::routing::NetPoint* Engine::netpointByNameOrNull(const char* name)
+simgrid::kernel::routing::NetPoint* Engine::getNetpointByNameOrNull(const char* name)
 {
   if (pimpl->netpoints_.find(name) == pimpl->netpoints_.end())
     return nullptr;
   return pimpl->netpoints_.at(name);
 }
 /** @brief Fill the provided vector with all existing netpoints */
 {
   if (pimpl->netpoints_.find(name) == pimpl->netpoints_.end())
     return nullptr;
   return pimpl->netpoints_.at(name);
 }
 /** @brief Fill the provided vector with all existing netpoints */
-void Engine::netpointList(std::vector<simgrid::kernel::routing::NetPoint*>* list)
+void Engine::getNetpointList(std::vector<simgrid::kernel::routing::NetPoint*>* list)
 {
   for (auto kv : pimpl->netpoints_)
     list->push_back(kv.second);
 {
   for (auto kv : pimpl->netpoints_)
     list->push_back(kv.second);
index 64753e8..37b4f3a 100644 (file)
@@ -25,9 +25,9 @@ File::File(const char* fullpath, sg_host_t host, void* userdata) : path_(fullpat
   Storage* st                  = nullptr;
   size_t longest_prefix_length = 0;
   std::string path;
   Storage* st                  = nullptr;
   size_t longest_prefix_length = 0;
   std::string path;
-  XBT_DEBUG("Search for storage name for '%s' on '%s'", fullpath, host->cname());
+  XBT_DEBUG("Search for storage name for '%s' on '%s'", fullpath, host->getCname());
 
 
-  for (auto mnt : host->mountedStorages()) {
+  for (auto mnt : host->getMountedStorages()) {
     XBT_DEBUG("See '%s'", mnt.first.c_str());
     mount_point = std::string(fullpath).substr(0, mnt.first.size());
 
     XBT_DEBUG("See '%s'", mnt.first.c_str());
     mount_point = std::string(fullpath).substr(0, mnt.first.size());
 
@@ -41,11 +41,11 @@ File::File(const char* fullpath, sg_host_t host, void* userdata) : path_(fullpat
     mount_point = std::string(fullpath).substr(0, longest_prefix_length);
     path        = std::string(fullpath).substr(longest_prefix_length, strlen(fullpath));
   } else
     mount_point = std::string(fullpath).substr(0, longest_prefix_length);
     path        = std::string(fullpath).substr(longest_prefix_length, strlen(fullpath));
   } else
-    xbt_die("Can't find mount point for '%s' on '%s'", fullpath, host->cname());
+    xbt_die("Can't find mount point for '%s' on '%s'", fullpath, host->getCname());
 
   pimpl_       = simcall_file_open(mount_point.c_str(), path.c_str(), st);
 
   pimpl_       = simcall_file_open(mount_point.c_str(), path.c_str(), st);
-  storage_type = st->type();
-  storageId    = st->name();
+  storage_type = st->getType();
+  storageId    = st->getName();
 }
 
 File::~File()
 }
 
 File::~File()
index b131fe6..a1520f9 100644 (file)
@@ -54,7 +54,7 @@ Host::~Host()
 
   delete pimpl_;
   if (pimpl_netpoint != nullptr) // not removed yet by a children class
 
   delete pimpl_;
   if (pimpl_netpoint != nullptr) // not removed yet by a children class
-    simgrid::s4u::Engine::instance()->netpointUnregister(pimpl_netpoint);
+    simgrid::s4u::Engine::getInstance()->netpointUnregister(pimpl_netpoint);
   delete pimpl_cpu;
   delete mounts;
 }
   delete pimpl_cpu;
   delete mounts;
 }
@@ -123,7 +123,8 @@ bool Host::isOn() {
   return this->pimpl_cpu->isOn();
 }
 
   return this->pimpl_cpu->isOn();
 }
 
-int Host::pstatesCount() const {
+int Host::getPstatesCount() const
+{
   return this->pimpl_cpu->getNbPStates();
 }
 
   return this->pimpl_cpu->getNbPStates();
 }
 
@@ -166,7 +167,7 @@ void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* late
 {
   simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
   if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
 {
   simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
   if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
-    XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", cname(), dest->cname(),
+    XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", getCname(), dest->getCname(),
                (latency == nullptr ? -1 : *latency));
     for (auto link : *links)
       XBT_CDEBUG(surf_route, "Link %s", link->cname());
                (latency == nullptr ? -1 : *latency));
     for (auto link : *links)
       XBT_CDEBUG(surf_route, "Link %s", link->cname());
@@ -174,14 +175,15 @@ void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* late
 }
 
 /** Get the properties assigned to a host */
 }
 
 /** Get the properties assigned to a host */
-xbt_dict_t Host::properties() {
+xbt_dict_t Host::getProperties()
+{
   return simgrid::simix::kernelImmediate([this] {
     return this->pimpl_->getProperties();
   });
 }
 
 /** Retrieve the property value (or nullptr if not set) */
   return simgrid::simix::kernelImmediate([this] {
     return this->pimpl_->getProperties();
   });
 }
 
 /** Retrieve the property value (or nullptr if not set) */
-const char* Host::property(const char* key)
+const char* Host::getProperty(const char* key)
 {
   return this->pimpl_->getProperty(key);
 }
 {
   return this->pimpl_->getProperty(key);
 }
@@ -192,7 +194,7 @@ void Host::setProperty(const char* key, const char* value)
 }
 
 /** Get the processes attached to the host */
 }
 
 /** Get the processes attached to the host */
-void Host::processes(std::vector<ActorPtr>* list)
+void Host::getProcesses(std::vector<ActorPtr>* list)
 {
   smx_actor_t actor = NULL;
   xbt_swag_foreach(actor, this->extension<simgrid::simix::Host>()->process_list) {
 {
   smx_actor_t actor = NULL;
   xbt_swag_foreach(actor, this->extension<simgrid::simix::Host>()->process_list) {
@@ -209,12 +211,14 @@ double Host::getPstateSpeed(int pstate_index)
 }
 
 /** @brief Get the peak processor speed (in flops/s), at the current pstate */
 }
 
 /** @brief Get the peak processor speed (in flops/s), at the current pstate */
-double Host::speed() {
+double Host::getSpeed()
+{
   return pimpl_cpu->getSpeed(1.0);
 }
 
 /** @brief Returns the number of core of the processor. */
   return pimpl_cpu->getSpeed(1.0);
 }
 
 /** @brief Returns the number of core of the processor. */
-int Host::coreCount() {
+int Host::getCoreCount()
+{
   return pimpl_cpu->coreCount();
 }
 
   return pimpl_cpu->coreCount();
 }
 
@@ -226,7 +230,7 @@ void Host::setPstate(int pstate_index)
   });
 }
 /** @brief Retrieve the pstate at which the host is currently running */
   });
 }
 /** @brief Retrieve the pstate at which the host is currently running */
-int Host::pstate()
+int Host::getPstate()
 {
   return this->pimpl_cpu->getPState();
 }
 {
   return this->pimpl_cpu->getPState();
 }
@@ -236,14 +240,14 @@ int Host::pstate()
  * \brief Returns the list of storages attached to an host.
  * \return a vector containing all storages attached to the host
  */
  * \brief Returns the list of storages attached to an host.
  * \return a vector containing all storages attached to the host
  */
-void Host::attachedStorages(std::vector<const char*>* storages)
+void Host::getAttachedStorages(std::vector<const char*>* storages)
 {
   simgrid::simix::kernelImmediate([this, storages] {
      this->pimpl_->getAttachedStorageList(storages);
   });
 }
 
 {
   simgrid::simix::kernelImmediate([this, storages] {
      this->pimpl_->getAttachedStorageList(storages);
   });
 }
 
-std::unordered_map<std::string, Storage*> const& Host::mountedStorages()
+std::unordered_map<std::string, Storage*> const& Host::getMountedStorages()
 {
   if (mounts == nullptr) {
     mounts = new std::unordered_map<std::string, Storage*>();
 {
   if (mounts == nullptr) {
     mounts = new std::unordered_map<std::string, Storage*>();
index f514ce5..b29cfcd 100644 (file)
@@ -16,7 +16,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel,s4u,"S4U Communication Mailboxes");
 namespace simgrid {
 namespace s4u {
 
 namespace simgrid {
 namespace s4u {
 
-const char *Mailbox::name() {
+const char* Mailbox::getName()
+{
   return pimpl_->name_;
 }
 
   return pimpl_->name_;
 }
 
@@ -58,7 +59,8 @@ void Mailbox::setReceiver(ActorPtr actor) {
 }
 
 /** @brief get the receiver (process associated to the mailbox) */
 }
 
 /** @brief get the receiver (process associated to the mailbox) */
-ActorPtr Mailbox::receiver() {
+ActorPtr Mailbox::getReceiver()
+{
   if (pimpl_->permanent_receiver == nullptr)
     return ActorPtr();
   return pimpl_->permanent_receiver->iface();
   if (pimpl_->permanent_receiver == nullptr)
     return ActorPtr();
   return pimpl_->permanent_receiver->iface();
index 1eec476..33dbf91 100644 (file)
@@ -41,7 +41,7 @@ NetZone::~NetZone()
   xbt_free(name_);
 }
 
   xbt_free(name_);
 }
 
-std::unordered_map<std::string, std::string>* NetZone::properties()
+std::unordered_map<std::string, std::string>* NetZone::getProperties()
 {
   return simgrid::simix::kernelImmediate([this] {
       return &properties_;
 {
   return simgrid::simix::kernelImmediate([this] {
       return &properties_;
@@ -49,7 +49,7 @@ std::unordered_map<std::string, std::string>* NetZone::properties()
 }
 
 /** Retrieve the property value (or nullptr if not set) */
 }
 
 /** Retrieve the property value (or nullptr if not set) */
-const char* NetZone::property(const char* key)
+const char* NetZone::getProperty(const char* key)
 {
   return properties_.at(key).c_str();
 }
 {
   return properties_.at(key).c_str();
 }
@@ -60,20 +60,20 @@ void NetZone::setProperty(const char* key, const char* value)
   });
 }
 
   });
 }
 
-std::vector<NetZone*>* NetZone::children()
+std::vector<NetZone*>* NetZone::getChildren()
 {
   return children_;
 }
 {
   return children_;
 }
-char* NetZone::name()
+char* NetZone::getCname()
 {
   return name_;
 }
 {
   return name_;
 }
-NetZone* NetZone::father()
+NetZone* NetZone::getFather()
 {
   return father_;
 }
 
 {
   return father_;
 }
 
-void NetZone::hosts(std::vector<s4u::Host*>* whereto)
+void NetZone::getHosts(std::vector<s4u::Host*>* whereto)
 {
   for (auto card : vertices_) {
     s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->name());
 {
   for (auto card : vertices_) {
     s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->name());
index d10a19d..694466c 100644 (file)
@@ -30,51 +30,52 @@ Storage* Storage::byName(const char* name)
   return &res->piface_;
 }
 
   return &res->piface_;
 }
 
-const char* Storage::name()
+const char* Storage::getName()
 {
   return pimpl_->cname();
 }
 
 {
   return pimpl_->cname();
 }
 
-const char* Storage::type()
+const char* Storage::getType()
 {
   return pimpl_->typeId_.c_str();
 }
 
 {
   return pimpl_->typeId_.c_str();
 }
 
-Host* Storage::host()
+Host* Storage::getHost()
 {
   return attached_to_;
 }
 
 {
   return attached_to_;
 }
 
-sg_size_t Storage::sizeFree()
+sg_size_t Storage::getSizeFree()
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getFreeSize(); });
 }
 
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getFreeSize(); });
 }
 
-sg_size_t Storage::sizeUsed()
+sg_size_t Storage::getSizeUsed()
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getUsedSize(); });
 }
 
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getUsedSize(); });
 }
 
-sg_size_t Storage::size() {
+sg_size_t Storage::getSize()
+{
   return pimpl_->size_;
 }
 
   return pimpl_->size_;
 }
 
-xbt_dict_t Storage::properties()
+xbt_dict_t Storage::getProperties()
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getProperties(); });
 }
 
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getProperties(); });
 }
 
-const char* Storage::property(const char* key)
+const char* Storage::getProperty(const char* key)
 {
 {
-  return static_cast<const char*>(xbt_dict_get_or_null(this->properties(), key));
+  return static_cast<const char*>(xbt_dict_get_or_null(this->getProperties(), key));
 }
 
 void Storage::setProperty(const char* key, char* value)
 {
 }
 
 void Storage::setProperty(const char* key, char* value)
 {
-  xbt_dict_set(this->properties(), key, value, nullptr);
+  xbt_dict_set(this->getProperties(), key, value, nullptr);
 }
 
 }
 
-std::map<std::string, sg_size_t>* Storage::content()
+std::map<std::string, sg_size_t>* Storage::getContent()
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getContent(); });
 }
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getContent(); });
 }
index 61fdcf5..805dd0e 100644 (file)
@@ -199,7 +199,7 @@ void SD_config(const char *key, const char *value){
  */
 void SD_create_environment(const char *platform_file)
 {
  */
 void SD_create_environment(const char *platform_file)
 {
-  simgrid::s4u::Engine::instance()->loadPlatform(platform_file);
+  simgrid::s4u::Engine::getInstance()->loadPlatform(platform_file);
 
   XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
 #if SIMGRID_HAVE_JEDULE
 
   XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
 #if SIMGRID_HAVE_JEDULE
index 8ea5cc1..0dee8e1 100644 (file)
@@ -685,7 +685,7 @@ double SD_task_get_execution_time(SD_task_t task, int host_count, const sg_host_
   for (int i = 0; i < host_count; i++) {
     double time = 0.0;
     if (flops_amount != nullptr)
   for (int i = 0; i < host_count; i++) {
     double time = 0.0;
     if (flops_amount != nullptr)
-      time = flops_amount[i] / host_list[i]->speed();
+      time = flops_amount[i] / host_list[i]->getSpeed();
 
     if (bytes_amount != nullptr)
       for (int j = 0; j < host_count; j++)
 
     if (bytes_amount != nullptr)
       for (int j = 0; j < host_count; j++)
index 5db33f1..1deab79 100644 (file)
@@ -38,7 +38,7 @@ void sg_host_exit()
    */
   std::vector<std::string> names = std::vector<std::string>();
   for (auto kv : simgrid::s4u::host_list)
    */
   std::vector<std::string> names = std::vector<std::string>();
   for (auto kv : simgrid::s4u::host_list)
-    names.push_back(kv.second->name());
+    names.push_back(kv.second->getName());
 
   std::sort(names.begin(), names.end());
 
 
   std::sort(names.begin(), names.end());
 
@@ -69,7 +69,7 @@ sg_host_t *sg_host_list() {
 
 const char *sg_host_get_name(sg_host_t host)
 {
 
 const char *sg_host_get_name(sg_host_t host)
 {
-  return host->cname();
+  return host->getCname();
 }
 
 void* sg_host_extension_get(sg_host_t host, size_t ext)
 }
 
 void* sg_host_extension_get(sg_host_t host, size_t ext)
@@ -89,8 +89,8 @@ sg_host_t sg_host_by_name(const char *name)
 
 static int hostcmp_voidp(const void* pa, const void* pb)
 {
 
 static int hostcmp_voidp(const void* pa, const void* pb)
 {
-  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->cname(),
-                (*static_cast<simgrid::s4u::Host* const*>(pb))->cname());
+  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->getCname(),
+                (*static_cast<simgrid::s4u::Host* const*>(pb))->getCname());
 }
 
 xbt_dynar_t sg_hosts_as_dynar()
 }
 
 xbt_dynar_t sg_hosts_as_dynar()
@@ -123,10 +123,10 @@ void sg_host_user_destroy(sg_host_t host) {
 xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t res = xbt_dict_new_homogeneous(nullptr);
 xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t res = xbt_dict_new_homogeneous(nullptr);
-  for (auto elm : host->mountedStorages()) {
+  for (auto elm : host->getMountedStorages()) {
     const char* mount_name = elm.first.c_str();
     sg_storage_t storage   = elm.second;
     const char* mount_name = elm.first.c_str();
     sg_storage_t storage   = elm.second;
-    xbt_dict_set(res, mount_name, (void*)storage->name(), nullptr);
+    xbt_dict_set(res, mount_name, (void*)storage->getName(), nullptr);
   }
 
   return res;
   }
 
   return res;
@@ -135,7 +135,7 @@ xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
 xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host){
   std::vector<const char*>* storage_vector = new std::vector<const char*>();
   xbt_dynar_t storage_dynar = xbt_dynar_new(sizeof(const char*), nullptr);
 xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host){
   std::vector<const char*>* storage_vector = new std::vector<const char*>();
   xbt_dynar_t storage_dynar = xbt_dynar_new(sizeof(const char*), nullptr);
-  host->attachedStorages(storage_vector);
+  host->getAttachedStorages(storage_vector);
   for (auto name : *storage_vector)
     xbt_dynar_push(storage_dynar, &name);
   delete storage_vector;
   for (auto name : *storage_vector)
     xbt_dynar_push(storage_dynar, &name);
   delete storage_vector;
@@ -147,7 +147,7 @@ xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host){
 /** @brief Returns the total speed of a host */
 double sg_host_speed(sg_host_t host)
 {
 /** @brief Returns the total speed of a host */
 double sg_host_speed(sg_host_t host)
 {
-  return host->speed();
+  return host->getSpeed();
 }
 
 double sg_host_get_available_speed(sg_host_t host)
 }
 
 double sg_host_get_available_speed(sg_host_t host)
@@ -160,7 +160,7 @@ double sg_host_get_available_speed(sg_host_t host)
  *  See also @ref plugin_energy.
  */
 int sg_host_get_nb_pstates(sg_host_t host) {
  *  See also @ref plugin_energy.
  */
 int sg_host_get_nb_pstates(sg_host_t host) {
-  return host->pstatesCount();
+  return host->getPstatesCount();
 }
 
 /** @brief Gets the pstate at which that host currently runs.
 }
 
 /** @brief Gets the pstate at which that host currently runs.
@@ -168,7 +168,7 @@ int sg_host_get_nb_pstates(sg_host_t host) {
  *  See also @ref plugin_energy.
  */
 int sg_host_get_pstate(sg_host_t host) {
  *  See also @ref plugin_energy.
  */
 int sg_host_get_pstate(sg_host_t host) {
-  return host->pstate();
+  return host->getPstate();
 }
 /** @brief Sets the pstate at which that host should run.
  *
 }
 /** @brief Sets the pstate at which that host should run.
  *
@@ -180,7 +180,7 @@ void sg_host_set_pstate(sg_host_t host,int pstate) {
 
 /** @brief Get the properties of an host */
 xbt_dict_t sg_host_get_properties(sg_host_t host) {
 
 /** @brief Get the properties of an host */
 xbt_dict_t sg_host_get_properties(sg_host_t host) {
-  return host->properties();
+  return host->getProperties();
 }
 
 /** \ingroup m_host_management
 }
 
 /** \ingroup m_host_management
@@ -246,10 +246,10 @@ void sg_host_dump(sg_host_t host)
 {
   xbt_dict_t props;
 
 {
   xbt_dict_t props;
 
-  XBT_INFO("Displaying host %s", host->cname());
-  XBT_INFO("  - speed: %.0f", host->speed());
+  XBT_INFO("Displaying host %s", host->getCname());
+  XBT_INFO("  - speed: %.0f", host->getSpeed());
   XBT_INFO("  - available speed: %.2f", sg_host_get_available_speed(host));
   XBT_INFO("  - available speed: %.2f", sg_host_get_available_speed(host));
-  props = host->properties();
+  props = host->getProperties();
 
   if (not xbt_dict_is_empty(props)) {
     XBT_INFO("  - properties:");
 
   if (not xbt_dict_is_empty(props)) {
     XBT_INFO("  - properties:");
index a9cbed4..79356f0 100644 (file)
@@ -231,10 +231,10 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
                                  xbt_dict_t properties, smx_actor_t parent_process)
 {
 
                                  xbt_dict_t properties, smx_actor_t parent_process)
 {
 
-  XBT_DEBUG("Start process %s on host '%s'", name, host->cname());
+  XBT_DEBUG("Start process %s on host '%s'", name, host->getCname());
 
   if (host->isOff()) {
 
   if (host->isOff()) {
-    XBT_WARN("Cannot launch process '%s' on failed host '%s'", name, host->cname());
+    XBT_WARN("Cannot launch process '%s' on failed host '%s'", name, host->getCname());
     return nullptr;
   }
 
     return nullptr;
   }
 
@@ -281,7 +281,7 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[process->pid] = process;
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[process->pid] = process;
-  XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->cname());
+  XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->getCname());
   xbt_dynar_push_as(simix_global->process_to_run, smx_actor_t, process);
   intrusive_ptr_add_ref(process);
 
   xbt_dynar_push_as(simix_global->process_to_run, smx_actor_t, process);
   intrusive_ptr_add_ref(process);
 
@@ -345,7 +345,7 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[process->pid] = process;
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[process->pid] = process;
-  XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->cname());
+  XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->getCname());
   xbt_dynar_push_as(simix_global->process_to_run, smx_actor_t, process);
 
   /* Tracing the process creation */
   xbt_dynar_push_as(simix_global->process_to_run, smx_actor_t, process);
 
   /* Tracing the process creation */
@@ -410,7 +410,7 @@ void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_actor_t process) {
  */
 void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
  */
 void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
-  XBT_DEBUG("Killing process %s@%s", process->cname(), process->host->cname());
+  XBT_DEBUG("Killing process %s@%s", process->cname(), process->host->getCname());
 
   process->context->iwannadie = 1;
   process->blocked = 0;
 
   process->context->iwannadie = 1;
   process->blocked = 0;
@@ -709,7 +709,7 @@ smx_activity_t SIMIX_process_sleep(smx_actor_t process, double duration)
   sg_host_t host = process->host;
 
   if (host->isOff())
   sg_host_t host = process->host;
 
   if (host->isOff())
-    THROWF(host_error, 0, "Host %s failed, you cannot sleep there.", host->cname());
+    THROWF(host_error, 0, "Host %s failed, you cannot sleep there.", host->getCname());
 
   simgrid::kernel::activity::SleepImpl* synchro = new simgrid::kernel::activity::SleepImpl();
   synchro->host = host;
 
   simgrid::kernel::activity::SleepImpl* synchro = new simgrid::kernel::activity::SleepImpl();
   synchro->host = host;
@@ -768,7 +768,7 @@ void SIMIX_process_yield(smx_actor_t self)
                                           self->properties,
                                           self->auto_restart);
     }
                                           self->properties,
                                           self->auto_restart);
     }
-    XBT_DEBUG("Process %s@%s is dead", self->cname(), self->host->cname());
+    XBT_DEBUG("Process %s@%s is dead", self->cname(), self->host->getCname());
     self->context->stop();
   }
 
     self->context->stop();
   }
 
@@ -857,7 +857,7 @@ smx_actor_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_actor_t p
 }
 /** @brief Restart a process, starting it again from the beginning. */
 smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer) {
 }
 /** @brief Restart a process, starting it again from the beginning. */
 smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer) {
-  XBT_DEBUG("Restarting process %s on %s", process->cname(), process->host->cname());
+  XBT_DEBUG("Restarting process %s on %s", process->cname(), process->host->getCname());
 
   //retrieve the arguments of the old process
   //FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
 
   //retrieve the arguments of the old process
   //FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
index c3bfd8d..3ebb020 100644 (file)
@@ -241,7 +241,7 @@ void simcall_process_set_kill_time(smx_actor_t process, double kill_time)
 
   if (kill_time <= SIMIX_get_clock() || simix_global->kill_process_function == nullptr)
     return;
 
   if (kill_time <= SIMIX_get_clock() || simix_global->kill_process_function == nullptr)
     return;
-  XBT_DEBUG("Set kill time %f for process %s@%s", kill_time, process->cname(), process->host->cname());
+  XBT_DEBUG("Set kill time %f for process %s@%s", kill_time, process->cname(), process->host->getCname());
   process->kill_timer = SIMIX_timer_set(kill_time, [=] {
     simix_global->kill_process_function(process);
     process->kill_timer=nullptr;
   process->kill_timer = SIMIX_timer_set(kill_time, [=] {
     simix_global->kill_process_function(process);
     process->kill_timer=nullptr;
index 202f269..376c1b9 100644 (file)
@@ -540,7 +540,7 @@ void SIMIX_run()
 
     /* Autorestart all process */
     for (auto host: host_that_restart) {
 
     /* Autorestart all process */
     for (auto host: host_that_restart) {
-      XBT_INFO("Restart processes on host %s", host->cname());
+      XBT_INFO("Restart processes on host %s", host->getCname());
       SIMIX_host_autorestart(host);
     }
     host_that_restart.clear();
       SIMIX_host_autorestart(host);
     }
     host_that_restart.clear();
@@ -681,11 +681,11 @@ void SIMIX_display_process_status()
 */
 
       XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
 */
 
       XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
-               process->cname(), process->host->cname(), synchro_description, process->waiting_synchro.get(),
+               process->cname(), process->host->getCname(), synchro_description, process->waiting_synchro.get(),
                process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state);
     }
     else {
                process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state);
     }
     else {
-      XBT_INFO("Process %lu (%s@%s)", process->pid, process->cname(), process->host->cname());
+      XBT_INFO("Process %lu (%s@%s)", process->pid, process->cname(), process->host->getCname());
     }
   }
 }
     }
   }
 }
index 4a695aa..18e9829 100644 (file)
@@ -57,7 +57,7 @@ namespace simgrid {
     void Host::turnOn()
     {
       for (auto arg : boot_processes) {
     void Host::turnOn()
     {
       for (auto arg : boot_processes) {
-        XBT_DEBUG("Booting Process %s(%s) right now", arg->name.c_str(), arg->host->cname());
+        XBT_DEBUG("Booting Process %s(%s) right now", arg->name.c_str(), arg->host->getCname());
         smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->host,
                                                                   arg->properties, nullptr);
         if (arg->kill_time >= 0)
         smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->host,
                                                                   arg->properties, nullptr);
         if (arg->kill_time >= 0)
@@ -84,11 +84,11 @@ void SIMIX_host_off(sg_host_t h, smx_actor_t issuer)
       smx_actor_t process = nullptr;
       xbt_swag_foreach(process, host->process_list) {
         SIMIX_process_kill(process, issuer);
       smx_actor_t process = nullptr;
       xbt_swag_foreach(process, host->process_list) {
         SIMIX_process_kill(process, issuer);
-        XBT_DEBUG("Killing %s@%s on behalf of %s", process->cname(), process->host->cname(), issuer->cname());
+        XBT_DEBUG("Killing %s@%s on behalf of %s", process->cname(), process->host->getCname(), issuer->cname());
       }
     }
   } else {
       }
     }
   } else {
-    XBT_INFO("Host %s is already off", h->cname());
+    XBT_INFO("Host %s is already off", h->getCname());
   }
 }
 
   }
 }
 
@@ -105,7 +105,7 @@ const char* sg_host_self_get_name()
   if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process)
     return "";
 
   if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process)
     return "";
 
-  return host->cname();
+  return host->getCname();
 }
 
 /**
 }
 
 /**
@@ -128,9 +128,9 @@ void SIMIX_host_add_auto_restart_process(
   arg->properties = properties;
   arg->auto_restart = auto_restart;
 
   arg->properties = properties;
   arg->auto_restart = auto_restart;
 
-  if (host->isOff() && not xbt_dict_get_or_null(watched_hosts_lib, host->cname())) {
-    xbt_dict_set(watched_hosts_lib, host->cname(), host, nullptr);
-    XBT_DEBUG("Push host %s to watched_hosts_lib because state == SURF_RESOURCE_OFF", host->cname());
+  if (host->isOff() && not xbt_dict_get_or_null(watched_hosts_lib, host->getCname())) {
+    xbt_dict_set(watched_hosts_lib, host->getCname(), host, nullptr);
+    XBT_DEBUG("Push host %s to watched_hosts_lib because state == SURF_RESOURCE_OFF", host->getCname());
   }
   host->extension<simgrid::simix::Host>()->auto_restart_processes.push_back(arg);
 }
   }
   host->extension<simgrid::simix::Host>()->auto_restart_processes.push_back(arg);
 }
@@ -141,7 +141,7 @@ void SIMIX_host_autorestart(sg_host_t host)
       host->extension<simgrid::simix::Host>()->auto_restart_processes;
 
   for (auto arg : process_list) {
       host->extension<simgrid::simix::Host>()->auto_restart_processes;
 
   for (auto arg : process_list) {
-    XBT_DEBUG("Restarting Process %s@%s right now", arg->name.c_str(), arg->host->cname());
+    XBT_DEBUG("Restarting Process %s@%s right now", arg->name.c_str(), arg->host->getCname());
     smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->host,
                                                               arg->properties, nullptr);
     if (arg->kill_time >= 0)
     smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->host,
                                                               arg->properties, nullptr);
     if (arg->kill_time >= 0)
@@ -278,7 +278,7 @@ void SIMIX_execution_finish(simgrid::kernel::activity::ExecImplPtr exec)
         break;
 
       case SIMIX_FAILED:
         break;
 
       case SIMIX_FAILED:
-        XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->host->cname());
+        XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->host->getCname());
         simcall->issuer->context->iwannadie = 1;
         SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
         break;
         simcall->issuer->context->iwannadie = 1;
         SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
         break;
index 5089731..cfd7f33 100644 (file)
@@ -35,7 +35,7 @@ smx_activity_t SIMIX_file_read(surf_file_t file, sg_size_t size, sg_host_t host)
 {
   /* check if the host is active */
   if (host->isOff())
 {
   /* check if the host is active */
   if (host->isOff())
-    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->cname());
+    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->getCname());
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
@@ -58,7 +58,7 @@ void simcall_HANDLER_file_write(smx_simcall_t simcall, surf_file_t fd, sg_size_t
 smx_activity_t SIMIX_file_write(surf_file_t file, sg_size_t size, sg_host_t host)
 {
   if (host->isOff())
 smx_activity_t SIMIX_file_write(surf_file_t file, sg_size_t size, sg_host_t host)
 {
   if (host->isOff())
-    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->cname());
+    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->getCname());
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
@@ -79,11 +79,11 @@ void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* mount, const c
 
 smx_activity_t SIMIX_file_open(const char* mount, const char* path, sg_storage_t st)
 {
 
 smx_activity_t SIMIX_file_open(const char* mount, const char* path, sg_storage_t st)
 {
-  if (st->host()->isOff())
-    THROWF(host_error, 0, "Host %s failed, you cannot call this function", st->host()->cname());
+  if (st->getHost()->isOff())
+    THROWF(host_error, 0, "Host %s failed, you cannot call this function", st->getHost()->getCname());
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
-  synchro->host                              = st->host();
+  synchro->host                              = st->getHost();
   synchro->surf_io                           = st->pimpl_->open(mount, path);
   synchro->surf_io->setData(synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
   synchro->surf_io                           = st->pimpl_->open(mount, path);
   synchro->surf_io->setData(synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -102,7 +102,7 @@ void simcall_HANDLER_file_close(smx_simcall_t simcall, surf_file_t fd, sg_host_t
 smx_activity_t SIMIX_file_close(surf_file_t file, sg_host_t host)
 {
   if (host->isOff())
 smx_activity_t SIMIX_file_close(surf_file_t file, sg_host_t host)
 {
   if (host->isOff())
-    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->cname());
+    THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->getCname());
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
index 151a577..2d5a76a 100644 (file)
@@ -458,13 +458,13 @@ static inline void SIMIX_comm_start(simgrid::kernel::activity::CommImplPtr comm)
     comm->surf_comm->setData(comm.get());
     comm->state = SIMIX_RUNNING;
 
     comm->surf_comm->setData(comm.get());
     comm->state = SIMIX_RUNNING;
 
-    XBT_DEBUG("Starting communication %p from '%s' to '%s' (surf_action: %p)", comm.get(), sender->cname(),
-              receiver->cname(), comm->surf_comm);
+    XBT_DEBUG("Starting communication %p from '%s' to '%s' (surf_action: %p)", comm.get(), sender->getCname(),
+              receiver->getCname(), comm->surf_comm);
 
     /* If a link is failed, detect it immediately */
     if (comm->surf_comm->getState() == simgrid::surf::Action::State::failed) {
 
     /* If a link is failed, detect it immediately */
     if (comm->surf_comm->getState() == simgrid::surf::Action::State::failed) {
-      XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure", sender->cname(),
-                receiver->cname());
+      XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure", sender->getCname(),
+                receiver->getCname());
       comm->state = SIMIX_LINK_FAILURE;
       comm->cleanupSurf();
     }
       comm->state = SIMIX_LINK_FAILURE;
       comm->cleanupSurf();
     }
@@ -475,11 +475,11 @@ static inline void SIMIX_comm_start(simgrid::kernel::activity::CommImplPtr comm)
       if (comm->src_proc->isSuspended())
         XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the "
                   "communication",
       if (comm->src_proc->isSuspended())
         XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the "
                   "communication",
-                  comm->src_proc->cname(), comm->src_proc->host->cname());
+                  comm->src_proc->cname(), comm->src_proc->host->getCname());
       else
         XBT_DEBUG("The communication is suspended on startup because dst (%s@%s) was suspended since it initiated the "
                   "communication",
       else
         XBT_DEBUG("The communication is suspended on startup because dst (%s@%s) was suspended since it initiated the "
                   "communication",
-                  comm->dst_proc->cname(), comm->dst_proc->host->cname());
+                  comm->dst_proc->cname(), comm->dst_proc->host->getCname());
 
       comm->surf_comm->suspend();
     }
 
       comm->surf_comm->suspend();
     }
@@ -562,9 +562,9 @@ void SIMIX_comm_finish(smx_activity_t synchro)
         case SIMIX_LINK_FAILURE:
           XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) "
                     "detached:%d",
         case SIMIX_LINK_FAILURE:
           XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) "
                     "detached:%d",
-                    synchro.get(), comm->src_proc ? comm->src_proc->host->cname() : nullptr,
-                    comm->dst_proc ? comm->dst_proc->host->cname() : nullptr, simcall->issuer->cname(), simcall->issuer,
-                    comm->detached);
+                    synchro.get(), comm->src_proc ? comm->src_proc->host->getCname() : nullptr,
+                    comm->dst_proc ? comm->dst_proc->host->getCname() : nullptr, simcall->issuer->cname(),
+                    simcall->issuer, comm->detached);
           if (comm->src_proc == simcall->issuer) {
             XBT_DEBUG("I'm source");
           } else if (comm->dst_proc == simcall->issuer) {
           if (comm->src_proc == simcall->issuer) {
             XBT_DEBUG("I'm source");
           } else if (comm->dst_proc == simcall->issuer) {
@@ -686,8 +686,8 @@ void SIMIX_comm_copy_data(smx_activity_t synchro)
     return;
 
   XBT_DEBUG("Copying comm %p data from %s (%p) -> %s (%p) (%zu bytes)", comm.get(),
     return;
 
   XBT_DEBUG("Copying comm %p data from %s (%p) -> %s (%p) (%zu bytes)", comm.get(),
-            comm->src_proc ? comm->src_proc->host->cname() : "a finished process", comm->src_buff,
-            comm->dst_proc ? comm->dst_proc->host->cname() : "a finished process", comm->dst_buff, buff_size);
+            comm->src_proc ? comm->src_proc->host->getCname() : "a finished process", comm->src_buff,
+            comm->dst_proc ? comm->dst_proc->host->getCname() : "a finished process", comm->dst_buff, buff_size);
 
   /* Copy at most dst_buff_size bytes of the message to receiver's buffer */
   if (comm->dst_buff_size)
 
   /* Copy at most dst_buff_size bytes of the message to receiver's buffer */
   if (comm->dst_buff_size)
index c7b8dba..cc9a814 100644 (file)
@@ -91,21 +91,21 @@ SmpiHost::SmpiHost(simgrid::s4u::Host *ptr) : host(ptr)
   if (not SmpiHost::EXTENSION_ID.valid())
     SmpiHost::EXTENSION_ID = simgrid::s4u::Host::extension_create<SmpiHost>();
 
   if (not SmpiHost::EXTENSION_ID.valid())
     SmpiHost::EXTENSION_ID = simgrid::s4u::Host::extension_create<SmpiHost>();
 
-  const char* orecv_string = host->property("smpi/or");
+  const char* orecv_string = host->getProperty("smpi/or");
   if (orecv_string != nullptr) {
     orecv_parsed_values = parse_factor(orecv_string);
   } else {
     orecv_parsed_values = parse_factor(xbt_cfg_get_string("smpi/or"));
   }
 
   if (orecv_string != nullptr) {
     orecv_parsed_values = parse_factor(orecv_string);
   } else {
     orecv_parsed_values = parse_factor(xbt_cfg_get_string("smpi/or"));
   }
 
-  const char* osend_string = host->property("smpi/os");
+  const char* osend_string = host->getProperty("smpi/os");
   if (osend_string != nullptr) {
     osend_parsed_values = parse_factor(osend_string);
   } else {
     osend_parsed_values = parse_factor(xbt_cfg_get_string("smpi/os"));
   }
 
   if (osend_string != nullptr) {
     osend_parsed_values = parse_factor(osend_string);
   } else {
     osend_parsed_values = parse_factor(xbt_cfg_get_string("smpi/os"));
   }
 
-  const char* oisend_string = host->property("smpi/ois");
+  const char* oisend_string = host->getProperty("smpi/ois");
   if (oisend_string != nullptr) {
     oisend_parsed_values = parse_factor(oisend_string);
   } else {
   if (oisend_string != nullptr) {
     oisend_parsed_values = parse_factor(oisend_string);
   } else {
index c19e14e..f83165f 100644 (file)
@@ -34,7 +34,7 @@ double smpi_get_host_power_peak_at(int pstate_index)
  */
 double smpi_get_host_current_power_peak()
 {
  */
 double smpi_get_host_current_power_peak()
 {
-  return sg_host_self()->speed();
+  return sg_host_self()->getSpeed();
 }
 
 /**
 }
 
 /**
index 6a1b4d3..c48bdcf 100644 (file)
@@ -2153,9 +2153,9 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
 
 int PMPI_Get_processor_name(char *name, int *resultlen)
 {
 
 int PMPI_Get_processor_name(char *name, int *resultlen)
 {
-  strncpy(name, sg_host_self()->cname(), strlen(sg_host_self()->cname()) < MPI_MAX_PROCESSOR_NAME - 1
-                                             ? strlen(sg_host_self()->cname()) + 1
-                                             : MPI_MAX_PROCESSOR_NAME - 1);
+  strncpy(name, sg_host_self()->getCname(), strlen(sg_host_self()->getCname()) < MPI_MAX_PROCESSOR_NAME - 1
+                                                ? strlen(sg_host_self()->getCname()) + 1
+                                                : MPI_MAX_PROCESSOR_NAME - 1);
   *resultlen = strlen(name) > MPI_MAX_PROCESSOR_NAME ? MPI_MAX_PROCESSOR_NAME : strlen(name);
 
   return MPI_SUCCESS;
   *resultlen = strlen(name) > MPI_MAX_PROCESSOR_NAME ? MPI_MAX_PROCESSOR_NAME : strlen(name);
 
   return MPI_SUCCESS;
index 0e8c01b..41fe4bd 100644 (file)
@@ -419,8 +419,8 @@ void Request::start()
     if (detached_ != 0 || ((flags_ & (ISEND | SSEND)) != 0)) { // issend should be treated as isend
       // isend and send timings may be different
       sleeptime = ((flags_ & ISEND) != 0)
     if (detached_ != 0 || ((flags_ & (ISEND | SSEND)) != 0)) { // issend should be treated as isend
       // isend and send timings may be different
       sleeptime = ((flags_ & ISEND) != 0)
-                      ? simgrid::s4u::Actor::self()->host()->extension<simgrid::smpi::SmpiHost>()->oisend(size_)
-                      : simgrid::s4u::Actor::self()->host()->extension<simgrid::smpi::SmpiHost>()->osend(size_);
+                      ? simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->oisend(size_)
+                      : simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->osend(size_);
     }
 
     if(sleeptime > 0.0){
     }
 
     if(sleeptime > 0.0){
@@ -626,7 +626,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   // nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
   // This can speed up the execution of certain applications by an order of magnitude, such as HPL
   static int nsleeps = 1;
   // nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
   // This can speed up the execution of certain applications by an order of magnitude, such as HPL
   static int nsleeps = 1;
-  double speed       = simgrid::s4u::Actor::self()->host()->speed();
+  double speed        = simgrid::s4u::Actor::self()->getHost()->getSpeed();
   double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
   MPI_Request request = new Request(nullptr, 0, MPI_CHAR, source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE :
                  comm->group()->index(source), comm->rank(), tag, comm, PERSISTENT | RECV);
   double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
   MPI_Request request = new Request(nullptr, 0, MPI_CHAR, source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE :
                  comm->group()->index(source), comm->rank(), tag, comm, PERSISTENT | RECV);
@@ -726,7 +726,8 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
   }
   if(req->detached_sender_ != nullptr){
     //integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
   }
   if(req->detached_sender_ != nullptr){
     //integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
-    double sleeptime = simgrid::s4u::Actor::self()->host()->extension<simgrid::smpi::SmpiHost>()->orecv(req->real_size());
+    double sleeptime =
+        simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->orecv(req->real_size());
     if(sleeptime > 0.0){
       simcall_process_sleep(sleeptime);
       XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
     if(sleeptime > 0.0){
       simcall_process_sleep(sleeptime);
       XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
index 9e03407..f14700b 100644 (file)
@@ -102,9 +102,9 @@ HostImpl::HostImpl(s4u::Host* host) : piface_(host)
 
 simgrid::surf::StorageImpl* HostImpl::findStorageOnMountList(const char* mount)
 {
 
 simgrid::surf::StorageImpl* HostImpl::findStorageOnMountList(const char* mount)
 {
-  XBT_DEBUG("Search for storage name '%s' on '%s'", mount, piface_->cname());
+  XBT_DEBUG("Search for storage name '%s' on '%s'", mount, piface_->getCname());
   if (storage_.find(mount) == storage_.end())
   if (storage_.find(mount) == storage_.end())
-    xbt_die("Can't find mount '%s' for '%s'", mount, piface_->cname());
+    xbt_die("Can't find mount '%s' for '%s'", mount, piface_->getCname());
 
   return storage_.at(mount);
 }
 
   return storage_.at(mount);
 }
@@ -112,8 +112,8 @@ simgrid::surf::StorageImpl* HostImpl::findStorageOnMountList(const char* mount)
 void HostImpl::getAttachedStorageList(std::vector<const char*>* storages)
 {
   for (auto s : storage_)
 void HostImpl::getAttachedStorageList(std::vector<const char*>* storages)
 {
   for (auto s : storage_)
-    if (s.second->attach_ == piface_->cname())
-      storages->push_back(s.second->piface_.name());
+    if (s.second->attach_ == piface_->getCname())
+      storages->push_back(s.second->piface_.getName());
 }
 
 Action* HostImpl::close(surf_file_t fd)
 }
 
 Action* HostImpl::close(surf_file_t fd)
index 282b59f..955de3a 100644 (file)
@@ -100,14 +100,14 @@ Cpu::Cpu(Model *model, simgrid::s4u::Host *host, std::vector<double> *speedPerPs
 
 Cpu::Cpu(Model* model, simgrid::s4u::Host* host, lmm_constraint_t constraint, std::vector<double>* speedPerPstate,
          int core)
 
 Cpu::Cpu(Model* model, simgrid::s4u::Host* host, lmm_constraint_t constraint, std::vector<double>* speedPerPstate,
          int core)
-    : Resource(model, host->cname(), constraint), coresAmount_(core), host_(host)
+    : Resource(model, host->getCname(), constraint), coresAmount_(core), host_(host)
 {
 {
-  xbt_assert(core > 0, "Host %s must have at least one core, not 0.", host->cname());
+  xbt_assert(core > 0, "Host %s must have at least one core, not 0.", host->getCname());
 
   speed_.peak = speedPerPstate->front();
   speed_.scale = 1;
   host->pimpl_cpu = this;
 
   speed_.peak = speedPerPstate->front();
   speed_.scale = 1;
   host->pimpl_cpu = this;
-  xbt_assert(speed_.scale > 0, "Speed of host %s must be >0", host->cname());
+  xbt_assert(speed_.scale > 0, "Speed of host %s must be >0", host->getCname());
 
   // Copy the power peak array:
   for (double value : *speedPerPstate) {
 
   // Copy the power peak array:
   for (double value : *speedPerPstate) {
@@ -170,13 +170,13 @@ int Cpu::coreCount()
 
 void Cpu::setStateTrace(tmgr_trace_t trace)
 {
 
 void Cpu::setStateTrace(tmgr_trace_t trace)
 {
-  xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Host %s", host_->cname());
+  xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Host %s", host_->getCname());
 
   stateEvent_ = future_evt_set->add_trace(trace, this);
 }
 void Cpu::setSpeedTrace(tmgr_trace_t trace)
 {
 
   stateEvent_ = future_evt_set->add_trace(trace, this);
 }
 void Cpu::setSpeedTrace(tmgr_trace_t trace)
 {
-  xbt_assert(speed_.event == nullptr, "Cannot set a second speed trace to Host %s", host_->cname());
+  xbt_assert(speed_.event == nullptr, "Cannot set a second speed trace to Host %s", host_->getCname());
 
   speed_.event = future_evt_set->add_trace(trace, this);
 }
 
   speed_.event = future_evt_set->add_trace(trace, this);
 }
index 1dd0268..d6e4f93 100644 (file)
@@ -132,11 +132,11 @@ static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t
     XBT_DEBUG("Graph extraction disabled by user.");
     return;
   }
     XBT_DEBUG("Graph extraction disabled by user.");
     return;
   }
-  XBT_DEBUG("Graph extraction for NetZone = %s", netzone->name());
-  if (not netzone->children()->empty()) {
+  XBT_DEBUG("Graph extraction for NetZone = %s", netzone->getCname());
+  if (not netzone->getChildren()->empty()) {
     //bottom-up recursion
     //bottom-up recursion
-    for (auto nz_son : *netzone->children()) {
-      container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, nz_son->name()));
+    for (auto nz_son : *netzone->getChildren()) {
+      container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, nz_son->getCname()));
       recursiveGraphExtraction(nz_son, child_container, filter);
     }
   }
       recursiveGraphExtraction(nz_son, child_container, filter);
     }
   }
@@ -165,7 +165,7 @@ static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t
  */
 static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
 {
  */
 static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
 {
-  const char* id = netzone.name();
+  const char* id = netzone.getCname();
 
   if (PJ_container_get_root() == nullptr){
     PJ_container_alloc ();
 
   if (PJ_container_get_root() == nullptr){
     PJ_container_alloc ();
@@ -237,7 +237,7 @@ static void instr_routing_parse_start_link(simgrid::s4u::Link& link)
 static void sg_instr_new_host(simgrid::s4u::Host& host)
 {
   container_t father = currentContainer.back();
 static void sg_instr_new_host(simgrid::s4u::Host& host)
 {
   container_t father = currentContainer.back();
-  container_t container = PJ_container_new(host.cname(), INSTR_HOST, father);
+  container_t container = PJ_container_new(host.getCname(), INSTR_HOST, father);
 
   if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
     type_t speed = PJ_type_get_or_null ("power", container->type);
 
   if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
     type_t speed = PJ_type_get_or_null ("power", container->type);
@@ -245,7 +245,7 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
       speed = PJ_type_variable_new ("power", nullptr, container->type);
     }
 
       speed = PJ_type_variable_new ("power", nullptr, container->type);
     }
 
-    double current_speed_state = host.speed();
+    double current_speed_state = host.getSpeed();
     new SetVariableEvent (0, container, speed, current_speed_state);
   }
   if (TRACE_uncategorized()){
     new SetVariableEvent (0, container, speed, current_speed_state);
   }
   if (TRACE_uncategorized()){
@@ -310,7 +310,7 @@ static void instr_routing_parse_end_platform ()
   currentContainer.clear();
   xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
   XBT_DEBUG ("Starting graph extraction.");
   currentContainer.clear();
   xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
   XBT_DEBUG ("Starting graph extraction.");
-  recursiveGraphExtraction(simgrid::s4u::Engine::instance()->netRoot(), PJ_container_get_root(), filter);
+  recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(), PJ_container_get_root(), filter);
   XBT_DEBUG ("Graph extraction finished.");
   xbt_dict_free(&filter);
   platform_created = 1;
   XBT_DEBUG ("Graph extraction finished.");
   xbt_dict_free(&filter);
   platform_created = 1;
@@ -429,10 +429,11 @@ int instr_platform_traced ()
 static void recursiveXBTGraphExtraction(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t netzone,
                                         container_t container)
 {
 static void recursiveXBTGraphExtraction(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t netzone,
                                         container_t container)
 {
-  if (not netzone->children()->empty()) {
+  if (not netzone->getChildren()->empty()) {
     //bottom-up recursion
     //bottom-up recursion
-    for (auto netzone_child : *netzone->children()) {
-      container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, netzone_child->name()));
+    for (auto netzone_child : *netzone->getChildren()) {
+      container_t child_container =
+          static_cast<container_t>(xbt_dict_get(container->children, netzone_child->getCname()));
       recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
     }
   }
       recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
     }
   }
@@ -445,7 +446,8 @@ xbt_graph_t instr_routing_platform_graph ()
   xbt_graph_t ret = xbt_graph_new_graph (0, nullptr);
   xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);
   xbt_dict_t edges = xbt_dict_new_homogeneous(nullptr);
   xbt_graph_t ret = xbt_graph_new_graph (0, nullptr);
   xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);
   xbt_dict_t edges = xbt_dict_new_homogeneous(nullptr);
-  recursiveXBTGraphExtraction(ret, nodes, edges, simgrid::s4u::Engine::instance()->netRoot(), PJ_container_get_root());
+  recursiveXBTGraphExtraction(ret, nodes, edges, simgrid::s4u::Engine::getInstance()->getNetRoot(),
+                              PJ_container_get_root());
   xbt_dict_free (&nodes);
   xbt_dict_free (&edges);
   return ret;
   xbt_dict_free (&nodes);
   xbt_dict_free (&edges);
   return ret;
index 4e6c8aa..4a771e9 100644 (file)
@@ -276,12 +276,12 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   std::vector<LinkImpl*>* back_route = nullptr;
   std::vector<LinkImpl*>* route = new std::vector<LinkImpl*>();
 
   std::vector<LinkImpl*>* back_route = nullptr;
   std::vector<LinkImpl*>* route = new std::vector<LinkImpl*>();
 
-  XBT_IN("(%s,%s,%g,%g)", src->cname(), dst->cname(), size, rate);
+  XBT_IN("(%s,%s,%g,%g)", src->getCname(), dst->getCname(), size, rate);
 
   src->routeTo(dst, route, &latency);
   xbt_assert(not route->empty() || latency,
              "You're trying to send data from %s to %s but there is no connecting path between these two hosts.",
 
   src->routeTo(dst, route, &latency);
   xbt_assert(not route->empty() || latency,
              "You're trying to send data from %s to %s but there is no connecting path between these two hosts.",
-             src->cname(), dst->cname());
+             src->getCname(), dst->getCname());
 
   for (auto link: *route)
     if (link->isOff())
 
   for (auto link: *route)
     if (link->isOff())
@@ -322,7 +322,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
                "Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
 
     gapAppend(size, route->at(0), action);
                "Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
 
     gapAppend(size, route->at(0), action);
-    XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)", action, src->cname(), dst->cname(), action->senderGap_,
+    XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)", action, src->getCname(), dst->getCname(), action->senderGap_,
               action->latency_);
   }
 
               action->latency_);
   }
 
index 48b9c1e..e3f1898 100644 (file)
@@ -28,7 +28,7 @@ static void IB_create_host_callback(simgrid::s4u::Host& host){
   IBNode* act = new IBNode(id);
 
   id++;
   IBNode* act = new IBNode(id);
 
   id++;
-  xbt_dict_set(((NetworkIBModel*)surf_network_model)->active_nodes, host.cname(), act, nullptr);
+  xbt_dict_set(((NetworkIBModel*)surf_network_model)->active_nodes, host.getCname(), act, nullptr);
 }
 
 static void IB_action_state_changed_callback(simgrid::surf::NetworkAction* action)
 }
 
 static void IB_action_state_changed_callback(simgrid::surf::NetworkAction* action)
@@ -52,10 +52,10 @@ static void IB_action_init_callback(simgrid::surf::NetworkAction* action, simgri
 {
   simgrid::surf::NetworkIBModel* ibModel = (simgrid::surf::NetworkIBModel*)surf_network_model;
 
 {
   simgrid::surf::NetworkIBModel* ibModel = (simgrid::surf::NetworkIBModel*)surf_network_model;
 
-  simgrid::surf::IBNode* act_src = (simgrid::surf::IBNode*)xbt_dict_get_or_null(ibModel->active_nodes, src->cname());
+  simgrid::surf::IBNode* act_src = (simgrid::surf::IBNode*)xbt_dict_get_or_null(ibModel->active_nodes, src->getCname());
   xbt_assert(act_src, "could not find src node active comms !");
 
   xbt_assert(act_src, "could not find src node active comms !");
 
-  simgrid::surf::IBNode* act_dst = (simgrid::surf::IBNode*)xbt_dict_get_or_null(ibModel->active_nodes, dst->cname());
+  simgrid::surf::IBNode* act_dst = (simgrid::surf::IBNode*)xbt_dict_get_or_null(ibModel->active_nodes, dst->getCname());
   xbt_assert(act_dst, "could not find dst node active comms !");
 
   ibModel->active_comms[action]=std::make_pair(act_src, act_dst);
   xbt_assert(act_dst, "could not find dst node active comms !");
 
   ibModel->active_comms[action]=std::make_pair(act_src, act_dst);
index 9404d6b..928f3da 100644 (file)
@@ -300,7 +300,7 @@ void LinkNS3::setLatencyTrace(tmgr_trace_t trace) {
 NetworkNS3Action::NetworkNS3Action(Model* model, double size, s4u::Host* src, s4u::Host* dst)
     : NetworkAction(model, size, false)
 {
 NetworkNS3Action::NetworkNS3Action(Model* model, double size, s4u::Host* src, s4u::Host* dst)
     : NetworkAction(model, size, false)
 {
-  XBT_DEBUG("Communicate from %s to %s", src->cname(), dst->cname());
+  XBT_DEBUG("Communicate from %s to %s", src->getCname(), dst->getCname());
 
   src_ = src;
   dst_ = dst;
 
   src_ = src;
   dst_ = dst;
index 2b88fb0..3096d22 100644 (file)
@@ -166,7 +166,7 @@ void HostEnergy::update()
 {
   double start_time  = this->last_updated;
   double finish_time = surf_get_clock();
 {
   double start_time  = this->last_updated;
   double finish_time = surf_get_clock();
-  double current_speed = host->speed();
+  double current_speed = host->getSpeed();
 
   if (start_time < finish_time) {
     double cpu_load;
 
   if (start_time < finish_time) {
     double cpu_load;
@@ -214,20 +214,21 @@ void HostEnergy::update()
 
     XBT_DEBUG("[update_energy of %s] period=[%.2f-%.2f]; current power peak=%.0E flop/s; consumption change: %.2f J -> "
               "%.2f J",
 
     XBT_DEBUG("[update_energy of %s] period=[%.2f-%.2f]; current power peak=%.0E flop/s; consumption change: %.2f J -> "
               "%.2f J",
-              host->cname(), start_time, finish_time, host->pimpl_cpu->speed_.peak, previous_energy, energy_this_step);
+              host->getCname(), start_time, finish_time, host->pimpl_cpu->speed_.peak, previous_energy,
+              energy_this_step);
   }
 
   /* Save data for the upcoming time interval: whether it's on/off and the pstate if it's on */
   }
 
   /* Save data for the upcoming time interval: whether it's on/off and the pstate if it's on */
-  this->pstate = host->isOn() ? host->pstate() : -1;
+  this->pstate = host->isOn() ? host->getPstate() : -1;
 }
 
 HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_get_clock())
 {
   initWattsRangeList();
 
 }
 
 HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_get_clock())
 {
   initWattsRangeList();
 
-  const char* off_power_str = host->property("watt_off");
+  const char* off_power_str = host->getProperty("watt_off");
   if (off_power_str != nullptr) {
   if (off_power_str != nullptr) {
-    char* msg       = bprintf("Invalid value for property watt_off of host %s: %%s", host->cname());
+    char* msg       = bprintf("Invalid value for property watt_off of host %s: %%s", host->getCname());
     this->watts_off = xbt_str_parse_double(off_power_str, msg);
     xbt_free(msg);
   }
     this->watts_off = xbt_str_parse_double(off_power_str, msg);
     xbt_free(msg);
   }
@@ -238,20 +239,20 @@ HostEnergy::~HostEnergy() = default;
 
 double HostEnergy::getWattMinAt(int pstate)
 {
 
 double HostEnergy::getWattMinAt(int pstate)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->cname());
+  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->getCname());
   return power_range_watts_list[pstate].min;
 }
 
 double HostEnergy::getWattMaxAt(int pstate)
 {
   return power_range_watts_list[pstate].min;
 }
 
 double HostEnergy::getWattMaxAt(int pstate)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->cname());
+  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->getCname());
   return power_range_watts_list[pstate].max;
 }
 
 /** @brief Computes the power consumed by the host according to the current pstate and processor load */
 double HostEnergy::getCurrentWattsValue(double cpu_load)
 {
   return power_range_watts_list[pstate].max;
 }
 
 /** @brief Computes the power consumed by the host according to the current pstate and processor load */
 double HostEnergy::getCurrentWattsValue(double cpu_load)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->cname());
+  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->getCname());
 
   /* min_power corresponds to the power consumed when only one core is active */
   /* max_power is the power consumed at 100% cpu load       */
 
   /* min_power corresponds to the power consumed when only one core is active */
   /* max_power is the power consumed at 100% cpu load       */
@@ -276,7 +277,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load)
      * (maxCpuLoad is by definition 1)
      */
     double power_slope;
      * (maxCpuLoad is by definition 1)
      */
     double power_slope;
-    int coreCount         = host->coreCount();
+    int coreCount         = host->getCoreCount();
     double coreReciprocal = static_cast<double>(1) / static_cast<double>(coreCount);
     if (coreCount > 1)
       power_slope = (max_power - min_power) / (1 - coreReciprocal);
     double coreReciprocal = static_cast<double>(1) / static_cast<double>(coreCount);
     if (coreCount > 1)
       power_slope = (max_power - min_power) / (1 - coreReciprocal);
@@ -304,24 +305,24 @@ double HostEnergy::getConsumedEnergy()
 
 void HostEnergy::initWattsRangeList()
 {
 
 void HostEnergy::initWattsRangeList()
 {
-  const char* all_power_values_str = host->property("watt_per_state");
+  const char* all_power_values_str = host->getProperty("watt_per_state");
   if (all_power_values_str == nullptr)
     return;
 
   std::vector<std::string> all_power_values;
   boost::split(all_power_values, all_power_values_str, boost::is_any_of(","));
   if (all_power_values_str == nullptr)
     return;
 
   std::vector<std::string> all_power_values;
   boost::split(all_power_values, all_power_values_str, boost::is_any_of(","));
-  XBT_DEBUG("%s: profile: %s, cores: %d", host->cname(), all_power_values_str, host->coreCount());
+  XBT_DEBUG("%s: profile: %s, cores: %d", host->getCname(), all_power_values_str, host->getCoreCount());
 
   int i = 0;
   for (auto current_power_values_str : all_power_values) {
     /* retrieve the power values associated with the current pstate */
     std::vector<std::string> current_power_values;
     boost::split(current_power_values, current_power_values_str, boost::is_any_of(":"));
 
   int i = 0;
   for (auto current_power_values_str : all_power_values) {
     /* retrieve the power values associated with the current pstate */
     std::vector<std::string> current_power_values;
     boost::split(current_power_values, current_power_values_str, boost::is_any_of(":"));
-    if (host->coreCount() == 1) {
+    if (host->getCoreCount() == 1) {
       xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:FullSpeed' power values because you have one core only.",
       xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:FullSpeed' power values because you have one core only.",
-                 host->cname());
+                 host->getCname());
       if (current_power_values.size() == 2) {
         // In this case, 1core == AllCores
         current_power_values.push_back(current_power_values.at(1));
       if (current_power_values.size() == 2) {
         // In this case, 1core == AllCores
         current_power_values.push_back(current_power_values.at(1));
@@ -331,20 +332,20 @@ void HostEnergy::initWattsRangeList()
                    "The energy profile of mono-cores should be formated as 'Idle:FullSpeed' only.\n"
                    "If you go for a 'Idle:OneCore:AllCores' power profile on mono-cores, then OneCore and AllCores "
                    "must be equal.",
                    "The energy profile of mono-cores should be formated as 'Idle:FullSpeed' only.\n"
                    "If you go for a 'Idle:OneCore:AllCores' power profile on mono-cores, then OneCore and AllCores "
                    "must be equal.",
-                   host->cname());
+                   host->getCname());
       }
     } else {
       xbt_assert(current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:OneCore:AllCores' power values because you have more than one core.",
       }
     } else {
       xbt_assert(current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:OneCore:AllCores' power values because you have more than one core.",
-                 host->cname());
+                 host->getCname());
     }
 
     /* min_power corresponds to the idle power (cpu load = 0) */
     /* max_power is the power consumed at 100% cpu load       */
     }
 
     /* min_power corresponds to the idle power (cpu load = 0) */
     /* max_power is the power consumed at 100% cpu load       */
-    char* msg_idle = bprintf("Invalid idle value for pstate %d on host %s: %%s", i, host->cname());
-    char* msg_min  = bprintf("Invalid OneCore value for pstate %d on host %s: %%s", i, host->cname());
-    char* msg_max  = bprintf("Invalid AllCores value for pstate %d on host %s: %%s", i, host->cname());
+    char* msg_idle = bprintf("Invalid idle value for pstate %d on host %s: %%s", i, host->getCname());
+    char* msg_min  = bprintf("Invalid OneCore value for pstate %d on host %s: %%s", i, host->getCname());
+    char* msg_max  = bprintf("Invalid AllCores value for pstate %d on host %s: %%s", i, host->getCname());
     PowerRange range(xbt_str_parse_double((current_power_values.at(0)).c_str(), msg_idle),
                      xbt_str_parse_double((current_power_values.at(1)).c_str(), msg_min),
                      xbt_str_parse_double((current_power_values.at(2)).c_str(), msg_max));
     PowerRange range(xbt_str_parse_double((current_power_values.at(0)).c_str(), msg_idle),
                      xbt_str_parse_double((current_power_values.at(1)).c_str(), msg_min),
                      xbt_str_parse_double((current_power_values.at(2)).c_str(), msg_max));
@@ -410,7 +411,7 @@ static void onHostDestruction(simgrid::s4u::Host& host)
 
   HostEnergy* host_energy = host.extension<HostEnergy>();
   host_energy->update();
 
   HostEnergy* host_energy = host.extension<HostEnergy>();
   host_energy->update();
-  XBT_INFO("Energy consumption of host %s: %f Joules", host.cname(), host_energy->getConsumedEnergy());
+  XBT_INFO("Energy consumption of host %s: %f Joules", host.getCname(), host_energy->getConsumedEnergy());
 }
 
 static void onSimulationEnd()
 }
 
 static void onSimulationEnd()
@@ -466,7 +467,7 @@ void sg_host_energy_update_all()
 {
   simgrid::simix::kernelImmediate([]() {
     std::vector<simgrid::s4u::Host*> list;
 {
   simgrid::simix::kernelImmediate([]() {
     std::vector<simgrid::s4u::Host*> list;
-    simgrid::s4u::Engine::instance()->hostList(&list);
+    simgrid::s4u::Engine::getInstance()->getHostList(&list);
     for (auto host : list)
       if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) // Ignore virtual machines
         host->extension<HostEnergy>()->update();
     for (auto host : list)
       if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) // Ignore virtual machines
         host->extension<HostEnergy>()->update();
@@ -513,7 +514,7 @@ double sg_host_get_current_consumption(sg_host_t host)
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
-  double cpu_load = lmm_constraint_get_usage(host->pimpl_cpu->constraint()) / host->speed();
+  double cpu_load = lmm_constraint_get_usage(host->pimpl_cpu->constraint()) / host->getSpeed();
   return host->extension<HostEnergy>()->getCurrentWattsValue(cpu_load);
 }
 
   return host->extension<HostEnergy>()->getCurrentWattsValue(cpu_load);
 }
 
index 7005e62..71ccf35 100644 (file)
@@ -76,12 +76,12 @@ void HostLoad::update()
 
 double HostLoad::getCurrentLoad()
 {
 
 double HostLoad::getCurrentLoad()
 {
-  return current_flops / (host->speed() * host->coreCount());
+  return current_flops / (host->getSpeed() * host->getCoreCount());
 }
 
 double HostLoad::getAverageLoad()
 {
 }
 
 double HostLoad::getAverageLoad()
 {
-  return getComputedFlops() / (host->speed() * host->coreCount() * (surf_get_clock() - last_reset));
+  return getComputedFlops() / (host->getSpeed() * host->getCoreCount() * (surf_get_clock() - last_reset));
 }
 
 double HostLoad::getComputedFlops()
 }
 
 double HostLoad::getComputedFlops()
index 5c4105d..663f8c8 100644 (file)
@@ -110,7 +110,7 @@ simgrid::kernel::routing::NetPoint* sg_platf_new_router(const char* name, const
 
   if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
     current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::base;
 
   if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
     current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::base;
-  xbt_assert(nullptr == simgrid::s4u::Engine::instance()->netpointByNameOrNull(name),
+  xbt_assert(nullptr == simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name),
              "Refusing to create a router named '%s': this name already describes a node.", name);
 
   simgrid::kernel::routing::NetPoint* netpoint =
              "Refusing to create a router named '%s': this name already describes a node.", name);
 
   simgrid::kernel::routing::NetPoint* netpoint =
@@ -322,10 +322,10 @@ void routing_cluster_add_backbone(simgrid::surf::LinkImpl* bb)
       dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing);
 
   xbt_assert(cluster, "Only hosts from Cluster can get a backbone.");
       dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing);
 
   xbt_assert(cluster, "Only hosts from Cluster can get a backbone.");
-  xbt_assert(nullptr == cluster->backbone_, "Cluster %s already has a backbone link!", cluster->name());
+  xbt_assert(nullptr == cluster->backbone_, "Cluster %s already has a backbone link!", cluster->getCname());
 
   cluster->backbone_ = bb;
 
   cluster->backbone_ = bb;
-  XBT_DEBUG("Add a backbone to AS '%s'", current_routing->name());
+  XBT_DEBUG("Add a backbone to AS '%s'", current_routing->getCname());
 }
 
 void sg_platf_new_cabinet(sg_platf_cabinet_cbarg_t cabinet)
 }
 
 void sg_platf_new_cabinet(sg_platf_cabinet_cbarg_t cabinet)
@@ -444,7 +444,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
                       "' does not exist\nExisting hosts: '";
     for (auto kv : simgrid::s4u::host_list) {
       simgrid::s4u::Host* host = kv.second;
                       "' does not exist\nExisting hosts: '";
     for (auto kv : simgrid::s4u::host_list) {
       simgrid::s4u::Host* host = kv.second;
-      msg += host->name();
+      msg += host->getName();
       msg += "', '";
       if (msg.length() > 1024) {
         msg.pop_back(); // remove trailing quote
       msg += "', '";
       if (msg.length() > 1024) {
         msg.pop_back(); // remove trailing quote
@@ -486,7 +486,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
     arg->kill_time = kill_time;
     arg->properties = current_property_set;
 
     arg->kill_time = kill_time;
     arg->properties = current_property_set;
 
-    XBT_DEBUG("Process %s@%s will be started at time %f", arg->name.c_str(), arg->host->cname(), start_time);
+    XBT_DEBUG("Process %s@%s will be started at time %f", arg->name.c_str(), arg->host->getCname(), start_time);
     SIMIX_timer_set(start_time, [arg, auto_restart]() {
       smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(arg->code), arg->data,
                                                                 arg->host, arg->properties, nullptr);
     SIMIX_timer_set(start_time, [arg, auto_restart]() {
       smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(arg->code), arg->data,
                                                                 arg->host, arg->properties, nullptr);
@@ -497,7 +497,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
       delete arg;
     });
   } else {                      // start_time <= SIMIX_get_clock()
       delete arg;
     });
   } else {                      // start_time <= SIMIX_get_clock()
-    XBT_DEBUG("Starting Process %s(%s) right now", arg->name.c_str(), host->cname());
+    XBT_DEBUG("Starting Process %s(%s) right now", arg->name.c_str(), host->getCname());
 
     smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(code), nullptr, host,
                                                               current_property_set, nullptr);
 
     smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(code), nullptr, host,
                                                               current_property_set, nullptr);
@@ -644,16 +644,16 @@ simgrid::s4u::NetZone* sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
   }
 
   if (current_routing == nullptr) { /* it is the first one */
   }
 
   if (current_routing == nullptr) { /* it is the first one */
-    xbt_assert(simgrid::s4u::Engine::instance()->pimpl->netRoot_ == nullptr,
+    xbt_assert(simgrid::s4u::Engine::getInstance()->pimpl->netRoot_ == nullptr,
                "All defined components must belong to a networking zone.");
                "All defined components must belong to a networking zone.");
-    simgrid::s4u::Engine::instance()->pimpl->netRoot_ = new_as;
+    simgrid::s4u::Engine::getInstance()->pimpl->netRoot_ = new_as;
 
   } else {
     /* set the father behavior */
     if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
       current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::recursive;
     /* add to the sons dictionary */
 
   } else {
     /* set the father behavior */
     if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
       current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::recursive;
     /* add to the sons dictionary */
-    current_routing->children()->push_back(static_cast<simgrid::s4u::NetZone*>(new_as));
+    current_routing->getChildren()->push_back(static_cast<simgrid::s4u::NetZone*>(new_as));
   }
 
   /* set the new current component of the tree */
   }
 
   /* set the new current component of the tree */
@@ -675,7 +675,7 @@ void sg_platf_new_AS_seal()
   xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
   current_routing->seal();
   simgrid::s4u::NetZone::onSeal(*current_routing);
   xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
   current_routing->seal();
   simgrid::s4u::NetZone::onSeal(*current_routing);
-  current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->father());
+  current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->getFather());
 }
 
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
 }
 
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
index 72e5825..e304c1f 100644 (file)
@@ -65,7 +65,7 @@ void surf_parse_assert_netpoint(char* hostname, const char* pre, const char* pos
   msg += " Existing netpoints: \n";
 
   std::vector<simgrid::kernel::routing::NetPoint*> list;
   msg += " Existing netpoints: \n";
 
   std::vector<simgrid::kernel::routing::NetPoint*> list;
-  simgrid::s4u::Engine::instance()->netpointList(&list);
+  simgrid::s4u::Engine::getInstance()->getNetpointList(&list);
   std::sort(list.begin(), list.end(),
       [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
       return a->name() < b->name();
   std::sort(list.begin(), list.end(),
       [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
       return a->name() < b->name();
@@ -519,7 +519,7 @@ void STag_surfxml_prop()
 {
   if (ZONE_TAG) { // We need to retrieve the most recently opened zone
     XBT_DEBUG("Set zone property %s -> %s", A_surfxml_prop_id, A_surfxml_prop_value);
 {
   if (ZONE_TAG) { // We need to retrieve the most recently opened zone
     XBT_DEBUG("Set zone property %s -> %s", A_surfxml_prop_id, A_surfxml_prop_value);
-    simgrid::s4u::NetZone* netzone = simgrid::s4u::Engine::instance()->netzoneByNameOrNull(A_surfxml_zone_id);
+    simgrid::s4u::NetZone* netzone = simgrid::s4u::Engine::getInstance()->getNetzoneByNameOrNull(A_surfxml_zone_id);
 
     netzone->setProperty(A_surfxml_prop_id, A_surfxml_prop_value);
   }
 
     netzone->setProperty(A_surfxml_prop_id, A_surfxml_prop_value);
   }
index c742c2b..6d8c6d5 100644 (file)
@@ -10,7 +10,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static void worker()
 {
   simgrid::s4u::this_actor::sleep_for(.5);
 static void worker()
 {
   simgrid::s4u::this_actor::sleep_for(.5);
-  XBT_INFO("Worker started (PID:%lu, PPID:%lu)", simgrid::s4u::this_actor::pid(), simgrid::s4u::this_actor::ppid());
+  XBT_INFO("Worker started (PID:%lu, PPID:%lu)", simgrid::s4u::this_actor::getPid(),
+           simgrid::s4u::this_actor::getPpid());
   while (1) {
     XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::isSuspended() ? "" : "not ");
     simgrid::s4u::this_actor::sleep_for(1);
   while (1) {
     XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::isSuspended() ? "" : "not ");
     simgrid::s4u::this_actor::sleep_for(1);
@@ -22,28 +23,28 @@ static void master()
 {
   simgrid::s4u::this_actor::sleep_for(1);
   std::vector<simgrid::s4u::ActorPtr>* actor_list = new std::vector<simgrid::s4u::ActorPtr>();
 {
   simgrid::s4u::this_actor::sleep_for(1);
   std::vector<simgrid::s4u::ActorPtr>* actor_list = new std::vector<simgrid::s4u::ActorPtr>();
-  simgrid::s4u::this_actor::host()->actorList(actor_list);
+  simgrid::s4u::this_actor::getHost()->actorList(actor_list);
 
   for (auto actor : *actor_list) {
 
   for (auto actor : *actor_list) {
-    XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->pid(), actor->ppid(), actor->name().c_str());
-    if (simgrid::s4u::this_actor::pid() != actor->pid())
+    XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->getPid(), actor->getPpid(), actor->getName().c_str());
+    if (simgrid::s4u::this_actor::getPid() != actor->getPid())
       actor->kill();
   }
 
   simgrid::s4u::ActorPtr actor =
       actor->kill();
   }
 
   simgrid::s4u::ActorPtr actor =
-      simgrid::s4u::Actor::createActor("worker from master", simgrid::s4u::this_actor::host(), worker);
+      simgrid::s4u::Actor::createActor("worker from master", simgrid::s4u::this_actor::getHost(), worker);
   simgrid::s4u::this_actor::sleep_for(2);
 
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Suspend Actor (pid=%lu)", actor->pid());
+  XBT_INFO("Suspend Actor (pid=%lu)", actor->getPid());
   actor->suspend();
 
   actor->suspend();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->pid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
 
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Resume Actor (pid=%lu)", actor->pid());
+  XBT_INFO("Resume Actor (pid=%lu)", actor->getPid());
   actor->resume();
 
   actor->resume();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->pid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
   actor->kill();
 
   simgrid::s4u::this_actor::sleep_for(2);
   actor->kill();
 
index 692701a..217a166 100644 (file)
@@ -13,7 +13,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u test");
 static void host()
 {
   char name[2048];
 static void host()
 {
   char name[2048];
-  int id = simgrid::s4u::this_actor::pid();
+  int id = simgrid::s4u::this_actor::getPid();
   snprintf(name, 2048, "%s%i", FILENAME1, id);
   simgrid::s4u::File* file = new simgrid::s4u::File(name, NULL);
   XBT_INFO("process %d is writing!", id);
   snprintf(name, 2048, "%s%i", FILENAME1, id);
   simgrid::s4u::File* file = new simgrid::s4u::File(name, NULL);
   XBT_INFO("process %d is writing!", id);
index 2624b07..86dcc62 100644 (file)
@@ -16,7 +16,7 @@ static int my_onexit(smx_process_exit_status_t status, int* pid)
 static void sendpid()
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
 static void sendpid()
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
-  int pid = simgrid::s4u::this_actor::pid();
+  int pid                          = simgrid::s4u::this_actor::getPid();
   double comm_size                 = 100000;
   simgrid::s4u::this_actor::onExit((int_f_pvoid_pvoid_t)my_onexit, &pid);
 
   double comm_size                 = 100000;
   simgrid::s4u::this_actor::onExit((int_f_pvoid_pvoid_t)my_onexit, &pid);
 
index 569b8cc..10ea064 100644 (file)
@@ -10,9 +10,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(storage, "Messages specific for this simulation");
 
 static void display_storage_properties(simgrid::s4u::Storage* storage)
 {
 
 static void display_storage_properties(simgrid::s4u::Storage* storage)
 {
-  xbt_dict_t props = storage->properties();
+  xbt_dict_t props = storage->getProperties();
   if (xbt_dict_length(props) > 0) {
   if (xbt_dict_length(props) > 0) {
-    XBT_INFO("\tProperties of mounted storage: %s", storage->name());
+    XBT_INFO("\tProperties of mounted storage: %s", storage->getName());
 
     xbt_dict_cursor_t cursor = NULL;
     char* key;
 
     xbt_dict_cursor_t cursor = NULL;
     char* key;
@@ -29,7 +29,7 @@ static sg_size_t write_local_file(const char* dest, sg_size_t file_size)
   simgrid::s4u::File* file = new simgrid::s4u::File(dest, nullptr);
   sg_size_t written        = file->write(file_size);
   XBT_INFO("%llu bytes on %llu bytes have been written by %s on /sd1", written, file_size,
   simgrid::s4u::File* file = new simgrid::s4u::File(dest, nullptr);
   sg_size_t written        = file->write(file_size);
   XBT_INFO("%llu bytes on %llu bytes have been written by %s on /sd1", written, file_size,
-           simgrid::s4u::Actor::self()->name().c_str());
+           simgrid::s4u::Actor::self()->getName().c_str());
   delete file;
   return written;
 }
   delete file;
   return written;
 }
@@ -40,7 +40,7 @@ static sg_size_t read_local_file(const char* src)
   sg_size_t file_size      = file->size();
   sg_size_t read           = file->read(file_size);
 
   sg_size_t file_size      = file->size();
   sg_size_t read           = file->read(file_size);
 
-  XBT_INFO("%s has read %llu on %s", simgrid::s4u::Actor::self()->name().c_str(), read, src);
+  XBT_INFO("%s has read %llu on %s", simgrid::s4u::Actor::self()->getName().c_str(), read, src);
   delete file;
 
   return read;
   delete file;
 
   return read;
@@ -53,7 +53,7 @@ static void hsm_put(const char* remote_host, const char* src, const char* dest)
   sg_size_t read_size = read_local_file(src);
 
   // Send file
   sg_size_t read_size = read_local_file(src);
 
   // Send file
-  XBT_INFO("%s sends %llu to %s", simgrid::s4u::this_actor::name().c_str(), read_size, remote_host);
+  XBT_INFO("%s sends %llu to %s", simgrid::s4u::this_actor::getName().c_str(), read_size, remote_host);
   char* payload                    = bprintf("%s %llu", dest, read_size);
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(remote_host);
   mailbox->put(payload, static_cast<double>(read_size));
   char* payload                    = bprintf("%s %llu", dest, read_size);
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(remote_host);
   mailbox->put(payload, static_cast<double>(read_size));
@@ -62,8 +62,8 @@ static void hsm_put(const char* remote_host, const char* src, const char* dest)
 
 static void display_storage_content(simgrid::s4u::Storage* storage)
 {
 
 static void display_storage_content(simgrid::s4u::Storage* storage)
 {
-  XBT_INFO("Print the content of the storage element: %s", storage->name());
-  std::map<std::string, sg_size_t>* content = storage->content();
+  XBT_INFO("Print the content of the storage element: %s", storage->getName());
+  std::map<std::string, sg_size_t>* content = storage->getContent();
   if (not content->empty()) {
     for (auto entry : *content)
       XBT_INFO("\t%s size: %llu bytes", entry.first.c_str(), entry.second);
   if (not content->empty()) {
     for (auto entry : *content)
       XBT_INFO("\t%s size: %llu bytes", entry.first.c_str(), entry.second);
@@ -84,10 +84,10 @@ static void get_set_storage_data(const char* storage_name)
   XBT_INFO("*** GET/SET DATA for storage element: %s ***", storage_name);
   simgrid::s4u::Storage* storage = simgrid::s4u::Storage::byName(storage_name);
 
   XBT_INFO("*** GET/SET DATA for storage element: %s ***", storage_name);
   simgrid::s4u::Storage* storage = simgrid::s4u::Storage::byName(storage_name);
 
-  char* data = static_cast<char*>(storage->userdata());
+  char* data = static_cast<char*>(storage->getUserdata());
   XBT_INFO("Get data: '%s'", data);
   storage->setUserdata(xbt_strdup("Some data"));
   XBT_INFO("Get data: '%s'", data);
   storage->setUserdata(xbt_strdup("Some data"));
-  data = static_cast<char*>(storage->userdata());
+  data = static_cast<char*>(storage->getUserdata());
   XBT_INFO("\tSet and get data: '%s'", data);
   xbt_free(data);
 }
   XBT_INFO("\tSet and get data: '%s'", data);
   xbt_free(data);
 }
@@ -97,7 +97,7 @@ static void dump_platform_storages()
   std::map<std::string, simgrid::s4u::Storage*>* storages = simgrid::s4u::allStorages();
 
   for (auto storage : *storages) {
   std::map<std::string, simgrid::s4u::Storage*>* storages = simgrid::s4u::allStorages();
 
   for (auto storage : *storages) {
-    XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->host()->cname());
+    XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->getHost()->getCname());
     storage.second->setProperty("other usage", xbt_strdup("gpfs"));
   }
   delete storages;
     storage.second->setProperty("other usage", xbt_strdup("gpfs"));
   }
   delete storages;
@@ -105,21 +105,21 @@ static void dump_platform_storages()
 
 static void storage_info(simgrid::s4u::Host* host)
 {
 
 static void storage_info(simgrid::s4u::Host* host)
 {
-  XBT_INFO("*** Storage info on %s ***", host->cname());
+  XBT_INFO("*** Storage info on %s ***", host->getCname());
 
 
-  for (auto elm : host->mountedStorages()) {
+  for (auto elm : host->getMountedStorages()) {
     const char* mount_name         = elm.first.c_str();
     simgrid::s4u::Storage* storage = elm.second;
     const char* mount_name         = elm.first.c_str();
     simgrid::s4u::Storage* storage = elm.second;
-    XBT_INFO("\tStorage name: %s, mount name: %s", storage->name(), mount_name);
+    XBT_INFO("\tStorage name: %s, mount name: %s", storage->getName(), mount_name);
 
 
-    sg_size_t free_size = storage->sizeFree();
-    sg_size_t used_size = storage->sizeUsed();
+    sg_size_t free_size = storage->getSizeFree();
+    sg_size_t used_size = storage->getSizeUsed();
 
     XBT_INFO("\t\tFree size: %llu bytes", free_size);
     XBT_INFO("\t\tUsed size: %llu bytes", used_size);
 
     display_storage_properties(storage);
 
     XBT_INFO("\t\tFree size: %llu bytes", free_size);
     XBT_INFO("\t\tUsed size: %llu bytes", used_size);
 
     display_storage_properties(storage);
-    dump_storage_by_name(storage->name());
+    dump_storage_by_name(storage->getName());
   }
 }
 
   }
 }
 
@@ -137,8 +137,8 @@ static void client()
 
 static void server()
 {
 
 static void server()
 {
-  storage_info(simgrid::s4u::this_actor::host());
-  simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::host()->cname());
+  storage_info(simgrid::s4u::this_actor::getHost());
+  simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->getCname());
 
   XBT_INFO("Server waiting for transfers ...");
   while (1) {
 
   XBT_INFO("Server waiting for transfers ...");
   while (1) {
@@ -155,7 +155,7 @@ static void server()
     }
   }
 
     }
   }
 
-  storage_info(simgrid::s4u::this_actor::host());
+  storage_info(simgrid::s4u::this_actor::getHost());
   dump_platform_storages();
 }
 
   dump_platform_storages();
 }
 
index 7810dd2..75a363c 100644 (file)
@@ -76,10 +76,10 @@ static void dump_platform()
   std::qsort((void*)hosts, totalHosts, sizeof(sg_host_t), name_compare_hosts);
 
   for (unsigned int i = 0; i < totalHosts; i++) {
   std::qsort((void*)hosts, totalHosts, sizeof(sg_host_t), name_compare_hosts);
 
   for (unsigned int i = 0; i < totalHosts; i++) {
-    std::printf("  <host id=\"%s\" speed=\"%.0f\"", hosts[i]->cname(), sg_host_speed(hosts[i]));
+    std::printf("  <host id=\"%s\" speed=\"%.0f\"", hosts[i]->getCname(), sg_host_speed(hosts[i]));
     props = sg_host_get_properties(hosts[i]);
     props = sg_host_get_properties(hosts[i]);
-    if (hosts[i]->coreCount() > 1) {
-      std::printf(" core=\"%d\"", hosts[i]->coreCount());
+    if (hosts[i]->getCoreCount() > 1) {
+      std::printf(" core=\"%d\"", hosts[i]->getCoreCount());
     }
     if (props && not xbt_dict_is_empty(props)) {
       std::printf(">\n");
     }
     if (props && not xbt_dict_is_empty(props)) {
       std::printf(">\n");
@@ -94,7 +94,7 @@ static void dump_platform()
 
   // Routers
   std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
 
   // Routers
   std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
-  simgrid::s4u::Engine::instance()->netpointList(&netcardList);
+  simgrid::s4u::Engine::getInstance()->getNetpointList(&netcardList);
   std::sort(netcardList.begin(), netcardList.end(),
             [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
               return a->name() < b->name();
   std::sort(netcardList.begin(), netcardList.end(),
             [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
               return a->name() < b->name();
@@ -131,7 +131,7 @@ static void dump_platform()
       simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
       simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
       if (not route.empty()) {
       simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
       simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
       if (not route.empty()) {
-        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->cname(), host2->cname());
+        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->getCname(), host2->getCname());
         for (auto link : route)
           std::printf("<link_ctn id=\"%s\"/>", link->cname());
         std::printf("\n  </route>\n");
         for (auto link : route)
           std::printf("<link_ctn id=\"%s\"/>", link->cname());
         std::printf("\n  </route>\n");
@@ -139,7 +139,7 @@ static void dump_platform()
     }
     for (auto netcardDst : netcardList) { // to router
       if (netcardDst->isRouter()) {
     }
     for (auto netcardDst : netcardList) { // to router
       if (netcardDst->isRouter()) {
-        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->cname(), netcardDst->cname());
+        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->getCname(), netcardDst->cname());
         std::vector<simgrid::surf::LinkImpl*> route;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
         for (auto link : route)
         std::vector<simgrid::surf::LinkImpl*> route;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
         for (auto link : route)
@@ -163,7 +163,7 @@ static void dump_platform()
       }
       for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
         simgrid::s4u::Host* host2 = hosts[it_dst];
       }
       for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
         simgrid::s4u::Host* host2 = hosts[it_dst];
-        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", value1->cname(), host2->cname());
+        std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", value1->cname(), host2->getCname());
         std::vector<simgrid::surf::LinkImpl*> route;
         simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
         std::vector<simgrid::surf::LinkImpl*> route;
         simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
index f5f11e0..0b09725 100644 (file)
@@ -19,7 +19,7 @@ int main(int argc, char **argv)
   std::printf("Host count: %zu, link number: %d\n", sg_host_count(), sg_link_count());
 
   std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
   std::printf("Host count: %zu, link number: %d\n", sg_host_count(), sg_link_count());
 
   std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
-  simgrid::s4u::Engine::instance()->netpointList(&netcardList);
+  simgrid::s4u::Engine::getInstance()->getNetpointList(&netcardList);
   std::sort(netcardList.begin(), netcardList.end(),
             [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
               return a->name() < b->name();
   std::sort(netcardList.begin(), netcardList.end(),
             [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
               return a->name() < b->name();
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
       type = "netzone";
     if (nc->isHost())
       type = "host";
       type = "netzone";
     if (nc->isHost())
       type = "host";
-    std::printf("   - Seen: \"%s\". Type: %s\n", host->cname(), type);
+    std::printf("   - Seen: \"%s\". Type: %s\n", host->getCname(), type);
   }
   xbt_dynar_free(&hosts);
 
   }
   xbt_dynar_free(&hosts);