Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simple constructor for NetZone's child classes.
[simgrid.git] / include / simgrid / kernel / routing / NetZoneImpl.hpp
index ffbf67b93c334d263f0015d5b4e13f77433ac82c..d530a4eb0f5da91d27defef283c98b65b4fab18e 100644 (file)
@@ -75,9 +75,11 @@ class XBT_PUBLIC NetZoneImpl : public xbt::PropertyHolder {
   resource::CpuModel* cpu_model_pm_;
   resource::DiskModel* disk_model_;
   simgrid::surf::HostModel* host_model_;
+  /** @brief Perform sealing procedure for derived classes, if necessary */
+  virtual void do_seal(){};
 
 protected:
-  explicit NetZoneImpl(NetZoneImpl* father, const std::string& name, resource::NetworkModel* network_model);
+  explicit NetZoneImpl(const std::string& name);
   NetZoneImpl(const NetZoneImpl&) = delete;
   NetZoneImpl& operator=(const NetZoneImpl&) = delete;
   virtual ~NetZoneImpl();
@@ -115,7 +117,6 @@ public:
   /** @brief Retrieves the disk model associated to this NetZone */
   resource::DiskModel* get_disk_model() const { return disk_model_; }
   /** @brief Retrieves the host model associated to this NetZone */
-  // FIXME[donassolo]: why HostModel isn't in resource namespace?
   simgrid::surf::HostModel* get_host_model() const { return host_model_; }
 
   const s4u::NetZone* get_iface() const { return &piface_; }
@@ -146,11 +147,15 @@ public:
                                 std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
 
   /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
-  virtual void seal() { sealed_ = true; };
+  void seal();
   virtual int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
   virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                          kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
                          std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
+  /** @brief Set parent of this Netzone */
+  void set_parent(NetZoneImpl* parent);
+  /** @brief Set network model for this Netzone */
+  void set_network_model(simgrid::kernel::resource::NetworkModel* netmodel);
 
   /* @brief get the route between two nodes in the full platform
    *