Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to clean and uniformize Activity Impls
[simgrid.git] / src / kernel / activity / IoImpl.cpp
index 1a08cb3..e24fe23 100644 (file)
@@ -37,28 +37,28 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-IoImplPtr IoImpl::set_name(const std::string& name)
+IoImpl& IoImpl::set_name(const std::string& name)
 {
   ActivityImpl::set_name(name);
-  return this;
+  return *this;
 }
 
-IoImplPtr IoImpl::set_type(s4u::Io::OpType type)
+IoImpl& IoImpl::set_type(s4u::Io::OpType type)
 {
   type_ = type;
-  return this;
+  return *this;
 }
 
-IoImplPtr IoImpl::set_size(sg_size_t size)
+IoImpl& IoImpl::set_size(sg_size_t size)
 {
   size_ = size;
-  return this;
+  return *this;
 }
 
-IoImplPtr IoImpl::set_storage(resource::StorageImpl* storage)
+IoImpl& IoImpl::set_storage(resource::StorageImpl* storage)
 {
   storage_ = storage;
-  return this;
+  return *this;
 }
 
 IoImpl* IoImpl::start()
@@ -68,7 +68,7 @@ IoImpl* IoImpl::start()
   surf_action_->set_data(this);
 
   XBT_DEBUG("Create IO synchro %p %s", this, get_cname());
-  IoImpl::on_start(this);
+  IoImpl::on_start(*this);
 
   return this;
 }
@@ -99,7 +99,7 @@ void IoImpl::post()
     default:
       THROW_IMPOSSIBLE;
   }
-  on_completion(this);
+  on_completion(*this);
 
   finish();
 }
@@ -134,8 +134,8 @@ void IoImpl::finish()
 /*************
  * Callbacks *
  *************/
-xbt::signal<void(IoImplPtr)> IoImpl::on_start;
-xbt::signal<void(IoImplPtr)> IoImpl::on_completion;
+xbt::signal<void(IoImpl const&)> IoImpl::on_start;
+xbt::signal<void(IoImpl const&)> IoImpl::on_completion;
 
 } // namespace activity
 } // namespace kernel