X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d3d4c51aace6f9daab7ee7bf664d9d56c81070f8..c139b4e36702f58bd8a75e87cf537959da82dbc9:/src/s4u/s4u_storage.cpp diff --git a/src/s4u/s4u_storage.cpp b/src/s4u/s4u_storage.cpp index f08f242214..1c3d02d8b6 100644 --- a/src/s4u/s4u_storage.cpp +++ b/src/s4u/s4u_storage.cpp @@ -27,7 +27,7 @@ void XBT_ATTRIB_DEPRECATED_v322( getStorageList(std::map* whereTo) { for (auto const& s : simgrid::s4u::Engine::getInstance()->getAllStorages()) - whereTo->insert({s->getName(), s}); + whereTo->insert({s->get_name(), s}); } Storage::Storage(std::string name, surf::StorageImpl* pimpl) : pimpl_(pimpl), name_(name) @@ -40,12 +40,12 @@ Storage* Storage::byName(std::string name) return Engine::getInstance()->storageByNameOrNull(name); } -const std::string& Storage::getName() const +const std::string& Storage::get_name() const { return name_; } -const char* Storage::getCname() const +const char* Storage::get_cname() const { return name_.c_str(); } @@ -95,7 +95,7 @@ simgrid::xbt::signal Storage::onDestruction; } /* namespace simgrid */ /* **************************** Public C interface *************************** */ -SG_BEGIN_DECL() + /** @addtogroup sg_storage_management * (#sg_storage_t) and the functions for managing it. */ @@ -109,13 +109,13 @@ SG_BEGIN_DECL() const char* sg_storage_get_name(sg_storage_t storage) { xbt_assert((storage != nullptr), "Invalid parameters"); - return storage->getCname(); + return storage->get_cname(); } const char* sg_storage_get_host(sg_storage_t storage) { xbt_assert((storage != nullptr), "Invalid parameters"); - return storage->getHost()->getCname(); + return storage->getHost()->get_cname(); } /** \ingroup sg_storage_management @@ -143,7 +143,7 @@ xbt_dict_t sg_storage_get_properties(sg_storage_t storage) * \param name a property name * \param value what to change the property to */ -void sg_storage_set_property_value(sg_storage_t storage, const char* name, char* value) +void sg_storage_set_property_value(sg_storage_t storage, const char* name, const char* value) { storage->setProperty(name, value); } @@ -202,20 +202,3 @@ sg_size_t sg_storage_write(sg_storage_t storage, sg_size_t size) { return storage->write(size); } - -/* ************************** Backward ABI compatibility *************************** */ -const char* MSG_storage_get_name(sg_storage_t storage) __attribute__((alias("sg_storage_get_name"))); -sg_storage_t MSG_storage_get_by_name(const char* name) __attribute__((alias("sg_storage_get_by_name"))); -xbt_dict_t MSG_storage_get_properties(sg_storage_t storage) __attribute__((alias("sg_storage_get_properties"))); -void MSG_storage_set_property_value(sg_storage_t storage, const char* name, const char* value) - __attribute__((alias("sg_storage_set_property_value"))); -const char* MSG_storage_get_property_value(sg_storage_t storage, const char* name) - __attribute__((alias("sg_storage_get_property_value"))); -xbt_dynar_t MSG_storages_as_dynar() __attribute__((alias("sg_storages_as_dynar"))); -void MSG_storage_set_data(sg_storage_t storage, void* data) __attribute__((alias("sg_storage_set_data"))); -void* MSG_storage_get_data(sg_storage_t storage) __attribute__((alias("sg_storage_get_data"))); -const char* MSG_storage_get_host(sg_storage_t storage) __attribute__((alias("sg_storage_get_host"))); -sg_size_t MSG_storage_read(sg_storage_t storage, sg_size_t size) __attribute__((alias("sg_storage_read"))); -sg_size_t MSG_storage_write(sg_storage_t storage, sg_size_t size) __attribute__((alias("sg_storage_write"))); - -SG_END_DECL()