X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4336abba16bcd2db4ea0606119483ccb6d86df28..a619bfb1b9a3769e775975828e35541111290665:/src/s4u/s4u_storage.cpp diff --git a/src/s4u/s4u_storage.cpp b/src/s4u/s4u_storage.cpp index 5e9d200358..d10a19d886 100644 --- a/src/s4u/s4u_storage.cpp +++ b/src/s4u/s4u_storage.cpp @@ -4,13 +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 "xbt/lib.h" #include namespace simgrid { namespace s4u { + std::map* allStorages() { std::unordered_map* map = surf::StorageImpl::storagesMap(); @@ -34,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() @@ -68,7 +74,7 @@ void Storage::setProperty(const char* key, char* value) xbt_dict_set(this->properties(), key, value, nullptr); } -std::map* Storage::content() +std::map* Storage::content() { return simgrid::simix::kernelImmediate([this] { return pimpl_->getContent(); }); }