Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / include / simgrid / s4u / NetZone.hpp
index 8156699..db5854b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2018. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2019. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -44,7 +44,7 @@ public:
   kernel::routing::NetZoneImpl* get_impl() { return pimpl_; }
 
 private:
-  kernel::routing::NetZoneImpl* pimpl_;
+  kernel::routing::NetZoneImpl* const pimpl_;
   std::unordered_map<std::string, std::string> properties_;
 
 public:
@@ -54,8 +54,8 @@ public:
   std::vector<NetZone*> get_children();
 
   /** Retrieve the property value (or nullptr if not set) */
-  const char* get_property(std::string key);
-  void set_property(std::string key, std::string value);
+  const char* get_property(const std::string& key);
+  void set_property(const std::string& key, std::string value);
 
   /* 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 */
@@ -74,6 +74,7 @@ public:
   static simgrid::xbt::signal<void(NetZone&)> on_creation;
   static simgrid::xbt::signal<void(NetZone&)> on_seal;
 
+#ifndef DOXYGEN
   // Deprecation wrappers
   /** @deprecated NetZone::get_father() */
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_father()") NetZone* getFather() { return get_father(); }
@@ -130,6 +131,7 @@ public:
       res->push_back(child);
     return res;
   }
+#endif
 };
 }
 }; // Namespace simgrid::s4u