Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Align Link get/set_data() with the Extendable version of that feature
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 14 Sep 2019 21:00:43 +0000 (23:00 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 14 Sep 2019 21:00:43 +0000 (23:00 +0200)
include/simgrid/s4u/Link.hpp
src/s4u/s4u_Link.cpp
src/surf/network_interface.hpp

index 3ef6cee..8d788ed 100644 (file)
@@ -64,9 +64,6 @@ public:
   bool is_on() const;
   void turn_off();
 
   bool is_on() const;
   void turn_off();
 
-  void* get_data(); /** Should be used only from the C interface. Prefer extensions in C++ */
-  void set_data(void* d);
-
 #ifndef DOXYGEN
   XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace(
       kernel::profile::Profile* profile)
 #ifndef DOXYGEN
   XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace(
       kernel::profile::Profile* profile)
index 4fecbd4..bb48a1b 100644 (file)
@@ -83,15 +83,6 @@ bool Link::is_on() const
   return this->pimpl_->is_on();
 }
 
   return this->pimpl_->is_on();
 }
 
-void* Link::get_data()
-{
-  return this->pimpl_->get_data();
-}
-void Link::set_data(void* d)
-{
-  simgrid::kernel::actor::simcall([this, d]() { this->pimpl_->set_data(d); });
-}
-
 void Link::set_state_profile(kernel::profile::Profile* profile)
 {
   simgrid::kernel::actor::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
 void Link::set_state_profile(kernel::profile::Profile* profile)
 {
   simgrid::kernel::actor::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
index d112d2b..c473874 100644 (file)
@@ -109,7 +109,6 @@ public:
  */
 class LinkImpl : public Resource, public surf::PropertyHolder {
   bool currently_destroying_ = false;
  */
 class LinkImpl : public Resource, public surf::PropertyHolder {
   bool currently_destroying_ = false;
-  void* userdata_            = nullptr;
 
 protected:
   LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint);
 
 protected:
   LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint);
@@ -119,8 +118,6 @@ protected:
 
 public:
   void destroy(); // Must be called instead of the destructor
 
 public:
   void destroy(); // Must be called instead of the destructor
-  void* get_data() { return userdata_; }
-  void set_data(void* d) { userdata_ = d; }
 
   /** @brief Public interface */
   s4u::Link piface_;
 
   /** @brief Public interface */
   s4u::Link piface_;