Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove features marked with DEPRECATED_v321.
[simgrid.git] / include / simgrid / s4u / Link.hpp
index b9ae777..e1832a8 100644 (file)
@@ -32,8 +32,11 @@ class XBT_PUBLIC Link : public simgrid::xbt::Extendable<Link> {
 public:
   enum class SharingPolicy { SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
 
+  kernel::resource::LinkImpl* get_impl() { return pimpl_; }
+
   /** @brief Retrieve a link from its name */
-  static Link* by_name(const char* name);
+  static Link* by_name(std::string name);
+  static Link* by_name_or_null(std::string name);
 
   /** @brief Retrieves the name of that link as a C++ string */
   const std::string& get_name() const;
@@ -91,7 +94,6 @@ public:
   static simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> 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(); }