});
}
+/** @brief Returns the list of direct children (no grand-children)
+ *
+ * This function returns the internal copy of the children, not a copy. Don't mess with it!
+ */
std::vector<NetZone*>* NetZone::getChildren()
{
return children_;
}
+
const char* NetZone::getCname() const
{
return name_.c_str();
}
}
+int NetZone::getHostCount()
+{
+ int count = 0;
+ for (auto const& card : vertices_) {
+ s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->getName());
+ if (host != nullptr)
+ count++;
+ }
+ return count;
+}
+
int NetZone::addComponent(kernel::routing::NetPoint* elm)
{
vertices_.push_back(elm);