X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/53dd673a07059d04f7ee5c280470958856fdf8d8..cb6448e71a64791c262d6c40c050cc0b8d8ed184:/include/simgrid/s4u/storage.hpp diff --git a/include/simgrid/s4u/storage.hpp b/include/simgrid/s4u/storage.hpp index 4b4d98af4e..4504bb8924 100644 --- a/include/simgrid/s4u/storage.hpp +++ b/include/simgrid/s4u/storage.hpp @@ -16,9 +16,12 @@ namespace simgrid { namespace s4u { XBT_PUBLIC_CLASS Storage { + friend s4u::Engine; + private: Storage(std::string name, smx_storage_t inferior); virtual ~Storage(); + public: /** Retrieve a Storage by its name. It must exist in the platform file */ static Storage &byName(const char* name); @@ -39,18 +42,17 @@ XBT_PUBLIC(const char *) MSG_storage_get_host(msg_storage_t storage); */ protected: smx_storage_t inferior(); -private: - static boost::unordered_map *storages_; - std::string name_; - smx_storage_t inferior_; - public: void setUserdata(void *data) {userdata_ = data;} void *userdata() {return userdata_;} + private: - void *userdata_ = NULL; + static boost::unordered_map *storages_; + std::string name_; + smx_storage_t pimpl_ = nullptr; + void *userdata_ = nullptr; }; } /* namespace s4u */