Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make member variables "private".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 26 Jun 2018 15:17:11 +0000 (17:17 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 26 Jun 2018 19:27:59 +0000 (21:27 +0200)
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/s4u/NetZone.hpp
src/kernel/routing/RoutedZone.cpp

index 39d737c..9e80905 100644 (file)
@@ -54,8 +54,6 @@ protected:
   explicit NetZoneImpl(NetZoneImpl* father, std::string name);
   virtual ~NetZoneImpl();
 
-  s4u::NetZone piface_;
-
 public:
   s4u::NetZone* get_iface() { return &piface_; }
 
@@ -89,6 +87,8 @@ protected:
                         /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency);
 
 private:
+  s4u::NetZone piface_;
+
   // our content, as known to our graph routing algorithm (maps vertex_id -> vertex)
   std::vector<kernel::routing::NetPoint*> vertices_;
 
index f43ca18..2e3d15c 100644 (file)
@@ -30,8 +30,6 @@ protected:
   explicit NetZone(kernel::routing::NetZoneImpl* impl);
   ~NetZone();
 
-  kernel::routing::NetZoneImpl* pimpl_;
-
 public:
   /** @brief Retrieves the name of that netzone as a C++ string */
   const std::string& get_name() const;
@@ -46,6 +44,7 @@ public:
   kernel::routing::NetZoneImpl* get_impl() { return pimpl_; }
 
 private:
+  kernel::routing::NetZoneImpl* pimpl_;
   std::unordered_map<std::string, std::string> properties_;
 
 public:
index 1a2058b..db0fb9a 100644 (file)
@@ -199,7 +199,7 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint*
                dstName, gw_dst->get_cname());
   }
 
-  piface_.on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list);
+  get_iface()->on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list);
 }
 }
 }