/** @brief Returns the list of direct children (no grand-children). This returns the internal data, no copy.
* Don't mess with it.*/
std::vector<NetZoneImpl*>* get_children() { return &children_; }
- void add_child(NetZoneImpl* new_zone) { children_.push_back(new_zone); }
+ void add_child(NetZoneImpl* new_zone);
/** @brief Retrieves the name of that netzone as a C++ string */
const std::string& get_name() const { return name_; }
s4u::Engine::get_instance()->netpoint_unregister(netpoint_);
}
+void NetZoneImpl::add_child(NetZoneImpl* new_zone)
+{
+ xbt_assert(not sealed_, "Cannot add a new child to the sealed zone %s", get_cname(););
+ children_.push_back(new_zone);
+}
+
/** @brief Returns the list of the hosts found in this NetZone (not recursively)
*
* Only the hosts that are directly contained in this NetZone are retrieved,