X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9cca09ad88fcaeb49f2637de97df519c3920aaa4..a4e7a60bca6c13451f237201eb5a7534e5da0838:/src/surf/surf_interface.hpp diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 93cbaf9500..6b9712d130 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -375,7 +375,9 @@ public: Model* model() const; /** @brief Get the name of the current Resource */ - const char* cname() const; + const std::string& getName() const; + /** @brief Get the name of the current Resource */ + const char* getCname() const; bool operator==(const Resource &other) const; @@ -418,8 +420,8 @@ protected: namespace std { template <> class hash { public: - std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.cname()); } - }; + std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.getCname()); } +}; } #endif /* SURF_MODEL_H_ */