Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename S4U::Channel to S4U::Mailbox. It was not a good idea
[simgrid.git] / src / s4u / s4u_mailbox.cpp
similarity index 55%
rename from src/s4u/s4u_channel.cpp
rename to src/s4u/s4u_mailbox.cpp
index 396b887..2ef1c0d 100644 (file)
@@ -4,30 +4,30 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "../../include/simgrid/s4u/mailbox.hpp"
 #include "xbt/log.h"
 #include "msg/msg_private.h"
 #include "msg/msg_mailbox.h"
 
-#include "simgrid/s4u/channel.hpp"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_channel,"S4U Communication Channels");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_channel,"S4U Communication Mailboxes");
 
 
 using namespace simgrid;
 
-boost::unordered_map <std::string, s4u::Channel *> *s4u::Channel::channels = new boost::unordered_map<std::string, s4u::Channel*> ();
+boost::unordered_map <std::string, s4u::Mailbox *> *s4u::Mailbox::channels = new boost::unordered_map<std::string, s4u::Mailbox*> ();
 
 
-s4u::Channel::Channel(const char*name, smx_rdv_t inferior) {
+s4u::Mailbox::Mailbox(const char*name, smx_rdv_t inferior) {
        p_inferior = inferior;
        channels->insert({name, this});
 }
-s4u::Channel *s4u::Channel::byName(const char*name) {
-       s4u::Channel * res;
+s4u::Mailbox *s4u::Mailbox::byName(const char*name) {
+       s4u::Mailbox * res;
        try {
                res = channels->at(name);
        } catch (std::out_of_range& e) {
-               res = new Channel(name,simcall_rdv_create(name));
+               res = new Mailbox(name,simcall_rdv_create(name));
        }
        return res;
 }