Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanups in the model initialization
[simgrid.git] / src / surf / network_interface.hpp
index fdf56e4..40fe146 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <xbt/base.h>
 
-#include <boost/unordered_map.hpp>
+#include <unordered_map>
 
 #include "xbt/fifo.h"
 #include "xbt/dict.h"
@@ -77,7 +77,7 @@ namespace simgrid {
        * unlimited.
        * @return The action representing the communication
        */
-      virtual Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate)=0;
+      virtual Action* communicate(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double size, double rate) = 0;
 
       /** @brief Function pointer to the function to use to solve the lmm_system_t
        *
@@ -119,7 +119,7 @@ namespace simgrid {
        * @return The new bandwidth.
        */
       virtual double bandwidthConstraint(double rate, double bound, double size);
-      double next_occuring_event_full(double now) override;
+      double nextOccuringEventFull(double now) override;
     };
 
     /************
@@ -162,10 +162,8 @@ namespace simgrid {
       static simgrid::xbt::signal<void(surf::Link*)> onStateChange;
 
       /** @brief Callback signal fired when a communication starts
-       *  Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)` */
-      static simgrid::xbt::signal<void(surf::NetworkAction*, kernel::routing::NetCard *src, kernel::routing::NetCard *dst)> onCommunicate;
-
-
+       *  Signature: `void(NetworkAction *action, host *src, host *dst)` */
+      static simgrid::xbt::signal<void(surf::NetworkAction*, s4u::Host* src, s4u::Host* dst)> onCommunicate;
 
       /** @brief Get the bandwidth in bytes per second of current Link */
       virtual double getBandwidth();
@@ -203,9 +201,9 @@ namespace simgrid {
         private:
       void *userData = nullptr;
 
-      /* List of all links */
+      /* List of all links. FIXME: should move to the Engine */
         private:
-      static boost::unordered_map<std::string, Link *> *links;
+      static std::unordered_map<std::string, Link *> *links;
         public:
       static Link *byName(const char* name);
       static int linksCount();