X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4775ee0f232bccc4978dfbfb8153b7593be7dd77..c67615c315f42bc56b88034eb591007c23e26667:/include/simgrid/s4u/Storage.hpp diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index 38e30b7e49..b8d328ef7c 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -28,8 +28,11 @@ public: explicit Storage(surf::StorageImpl * pimpl) : pimpl_(pimpl) {} virtual ~Storage() = default; /** Retrieve a Storage by its name. It must exist in the platform file */ - static Storage* byName(const char* name); - const char* getName(); + static Storage* byName(std::string name); + /** @brief Retrieves the name of that storage as a C++ string */ + std::string const& getName() const; + /** @brief Retrieves the name of that storage as a C string */ + const char* getCname() const; const char* getType(); Host* getHost(); sg_size_t getSize(); /** Retrieve the total amount of space of this storage element */ @@ -37,8 +40,8 @@ public: sg_size_t getSizeUsed(); std::map* getProperties(); - const char* getProperty(const char* key); - void setProperty(const char* key, const char* value); + const char* getProperty(std::string key); + void setProperty(std::string, std::string value); std::map* getContent(); void setUserdata(void* data) { userdata_ = data; }