-DragonflyRouter::~DragonflyRouter()
-{
- if (this->myNodes_ != nullptr)
- xbt_free(myNodes_);
- if (this->greenLinks_ != nullptr)
- xbt_free(greenLinks_);
- if (this->blackLinks_ != nullptr)
- xbt_free(blackLinks_);
- if (this->blueLinks_ != nullptr)
- xbt_free(blueLinks_);
-}
-
-void DragonflyZone::generateRouters()
-{
- this->routers_ = static_cast<DragonflyRouter**>(xbt_malloc0(this->numGroups_ * this->numChassisPerGroup_ *
- this->numBladesPerChassis_ * sizeof(DragonflyRouter*)));
-
- for (unsigned int i = 0; i < this->numGroups_; i++) {
- for (unsigned int j = 0; j < this->numChassisPerGroup_; j++) {
- for (unsigned int k = 0; k < this->numBladesPerChassis_; k++) {
- DragonflyRouter* router = new DragonflyRouter(i, j, k);
- this->routers_[i * this->numChassisPerGroup_ * this->numBladesPerChassis_ + j * this->numBladesPerChassis_ +
- k] = router;
- }
- }
- }
-}
-
-void DragonflyZone::createLink(std::string id, int numlinks, surf::LinkImpl** linkup, surf::LinkImpl** linkdown)
+void DragonflyZone::create_link(const std::string& id, int numlinks, resource::LinkImpl** linkup,
+ resource::LinkImpl** linkdown)