X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/65beede857f93e33c96e544f76b93793c973dc10..a5a8281d1b8c42bbdb10d492d7251b35759ea32d:/include/simgrid/s4u/NetZone.hpp diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index 0ba5c13e77..609542f022 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -27,8 +27,7 @@ class XBT_PUBLIC NetZone { protected: friend kernel::routing::NetZoneImpl; - explicit NetZone(kernel::routing::NetZoneImpl* impl); - ~NetZone(); + explicit NetZone(kernel::routing::NetZoneImpl* impl) : pimpl_(impl) {} public: /** @brief Retrieves the name of that netzone as a C++ string */ @@ -41,7 +40,7 @@ public: std::vector get_all_hosts(); int get_host_count(); - kernel::routing::NetZoneImpl* get_impl() { return pimpl_; } + kernel::routing::NetZoneImpl* get_impl() const { return pimpl_; } private: kernel::routing::NetZoneImpl* const pimpl_; @@ -49,12 +48,12 @@ private: public: /** Get the properties assigned to a netzone */ - std::unordered_map* get_properties(); + const std::unordered_map* get_properties() const; std::vector get_children(); /** Retrieve the property value (or nullptr if not set) */ - const char* get_property(const std::string& key); + const char* get_property(const std::string& key) const; void set_property(const std::string& key, const std::string& value); /* Add content to the netzone, at parsing time. It should be sealed afterward. */