Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #193 from Takishipp/signals
[simgrid.git] / src / s4u / s4u_storage.cpp
index 23c7e60..d10a19d 100644 (file)
@@ -4,12 +4,14 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../surf/StorageImpl.hpp"
+#include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/Storage.hpp"
 #include "simgrid/simix.hpp"
 #include <unordered_map>
 
 namespace simgrid {
 namespace s4u {
+
 std::map<std::string, Storage*>* allStorages()
 {
   std::unordered_map<std::string, surf::StorageImpl*>* map = surf::StorageImpl::storagesMap();
@@ -33,9 +35,14 @@ const char* Storage::name()
   return pimpl_->cname();
 }
 
-const char* Storage::host()
+const char* Storage::type()
+{
+  return pimpl_->typeId_.c_str();
+}
+
+Host* Storage::host()
 {
-  return pimpl_->attach_;
+  return attached_to_;
 }
 
 sg_size_t Storage::sizeFree()
@@ -67,7 +74,7 @@ void Storage::setProperty(const char* key, char* value)
   xbt_dict_set(this->properties(), key, value, nullptr);
 }
 
-std::map<std::string, sg_size_t*>* Storage::content()
+std::map<std::string, sg_size_t>* Storage::content()
 {
   return simgrid::simix::kernelImmediate([this] { return pimpl_->getContent(); });
 }