Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert getCname to get_cname
[simgrid.git] / include / simgrid / s4u / Link.hpp
index f554dfe..d236911 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -23,8 +23,7 @@ class NetworkAction;
 };
 namespace s4u {
 /** @brief A Link represents the network facilities between [hosts](\ref simgrid::s4u::Host) */
-XBT_PUBLIC_CLASS Link : public simgrid::xbt::Extendable<Link>
-{
+class XBT_PUBLIC Link : public simgrid::xbt::Extendable<Link> {
   friend simgrid::surf::LinkImpl;
 
   // Links are created from the NetZone, and destroyed by their private implementation when the simulation ends
@@ -38,9 +37,12 @@ public:
   static Link* byName(const char* name);
 
   /** @brief Retrieves the name of that link as a C++ string */
-  const std::string& getName() const;
+  const std::string& get_name() const;
   /** @brief Retrieves the name of that link as a C string */
-  const char* getCname() const;
+  const char* get_cname() const;
+
+  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(); }
 
   /** @brief Get the bandwidth in bytes per second of current Link */
   double bandwidth();
@@ -48,7 +50,7 @@ public:
   /** @brief Get the latency in seconds of current Link */
   double latency();
 
-  /** @brief The sharing policy is a @{link e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX)
+  /** @brief The sharing policy is a @{link e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: SPLITDUPLEX)
    */
   int sharingPolicy();
 
@@ -90,7 +92,7 @@ public:
   /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */
   static simgrid::xbt::signal<void(surf::NetworkAction*)> onCommunicationStateChange;
 
-  XBT_ATTRIB_DEPRECATED_v321("Use getCname(): v3.21 will turn this warning into an error.") const char* name();
+  XBT_ATTRIB_DEPRECATED_v321("Use get_cname(): v3.21 will turn this warning into an error.") const char* name();
 };
 }
 }