Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codefactor: malformed whitespace issues
[simgrid.git] / include / simgrid / s4u / NetZone.hpp
index 8004e96..e95407b 100644 (file)
@@ -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 */
@@ -45,18 +44,16 @@ public:
 
 private:
   kernel::routing::NetZoneImpl* const pimpl_;
-  std::unordered_map<std::string, std::string> properties_;
 
 public:
   /** Get the properties assigned to a netzone */
-  std::unordered_map<std::string, std::string>* get_properties();
-
-  std::vector<NetZone*> get_children();
-
+  const std::unordered_map<std::string, std::string>* get_properties() const;
   /** 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);
 
+  std::vector<NetZone*> get_children();
+
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
   int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
   void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,