Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Engine is in charge of platform creation, not SIMIX anymore
[simgrid.git] / src / s4u / s4u_Storage.cpp
index b1e3e71..f0bd686 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2019. 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. */
@@ -58,14 +58,11 @@ void Storage::set_property(std::string key, std::string value)
 
 IoPtr Storage::io_init(sg_size_t size, Io::OpType type)
 {
-  IoPtr res     = IoPtr(new Io(size, type));
-  res->storage_ = this;
-  return res;
+  return IoPtr(new Io(this, size, type));
 }
 
 IoPtr Storage::read_async(sg_size_t size)
 {
-
   IoPtr res = io_init(size, Io::OpType::READ);
   res->start();
   return res;
@@ -93,13 +90,6 @@ sg_size_t Storage::write(sg_size_t size)
   return i->get_performed_ioops();
 }
 
-// Deprecated functions
-void getStorageList(std::map<std::string, Storage*>* whereTo)
-{
-  for (auto const& s : simgrid::s4u::Engine::get_instance()->get_all_storages())
-    whereTo->insert({s->get_name(), s});
-}
-
 } /* namespace s4u */
 } /* namespace simgrid */