Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
S4U: Implement Storage and File
[simgrid.git] / include / simgrid / s4u / mailbox.hpp
index c76a4d9..77390cf 100644 (file)
@@ -8,11 +8,13 @@
 
 #include <boost/unordered_map.hpp>
 
-#include "simgrid/s4u/process.hpp"
+#include "actor.hpp"
 
 namespace simgrid {
 namespace s4u {
 
+class Comm;
+
 /** @brief Mailboxes
  *
  * Rendez-vous point for network communications, similar to URLs on which you could post and retrieve data.
@@ -21,7 +23,7 @@ namespace s4u {
  * sender and receiver.
  */
 class Mailbox {
-       friend Process;
+       friend Comm;
 
 private:
        Mailbox(const char*name, smx_rdv_t inferior);
@@ -32,13 +34,15 @@ protected:
        smx_rdv_t getInferior() { return p_inferior; }
 
 public:
+       /** Get the name of that mailbox */
+       const char *getName();
        /** Retrieve the mailbox associated to the given string */
        static Mailbox *byName(const char *name);
 
 private:
        std::string p_name;
        smx_rdv_t p_inferior;
-       static boost::unordered_map<std::string, Mailbox *> *channels;
+       static boost::unordered_map<std::string, Mailbox *> *mailboxes;
 };
 }} // namespace simgrid::s4u