Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stringify s4u::Link
[simgrid.git] / include / simgrid / s4u / Link.hpp
index 44cc8b6..a0b4a5b 100644 (file)
@@ -6,6 +6,7 @@
 #ifndef S4U_LINK_HPP_
 #define S4U_LINK_HPP_
 
+#include <simgrid/kernel/resource/Action.hpp>
 #include <simgrid/link.h>
 #include <string>
 #include <unordered_map>
@@ -29,13 +30,9 @@ class XBT_PUBLIC Link : public simgrid::xbt::Extendable<Link> {
   // The private implementation, that never changes
   kernel::resource::LinkImpl* const pimpl_;
 
-private:
-  bool currentlyDestroying_ = false;
-
 public:
   enum class SharingPolicy { SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
 
-  virtual void destroy();
   kernel::resource::LinkImpl* get_impl() { return pimpl_; }
 
   /** @brief Retrieve a link from its name */
@@ -75,7 +72,7 @@ public:
   void set_latency_trace(tmgr_trace_t trace);   /*< setup the trace file with latency events (peak latency changes due to
                                                   external load). Trace must contain absolute values */
 
-  const char* get_property(const char* key);
+  const char* get_property(std::string key);
   void set_property(std::string key, std::string value);
 
   /* The signals */
@@ -95,10 +92,10 @@ public:
   static simgrid::xbt::signal<void(kernel::resource::NetworkAction*, s4u::Host* src, s4u::Host* dst)> on_communicate;
 
   /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */
-  static simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> on_communication_state_change;
+  static simgrid::xbt::signal<void(kernel::resource::NetworkAction*, kernel::resource::Action::State)>
+      on_communication_state_change;
 
   // Deprecated methods
-  XBT_ATTRIB_DEPRECATED_v321("Use get_cname(): v3.21 will turn this warning into an error.") const char* name();
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); }