+ /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */
+ /* The pair is {link_up, link_down} */
+ std::unordered_map<unsigned int, std::pair<resource::LinkImpl*, resource::LinkImpl*>> private_links_;
+ std::unordered_map<unsigned int, NetPoint*> gateways_; //!< list of gateways for leafs (if they're netzones)
+ resource::LinkImpl* backbone_ = nullptr;
+ NetPoint* router_ = nullptr;
+ bool has_limiter_ = false;
+ bool has_loopback_ = false;
+ unsigned int num_links_per_node_ = 1; /* may be 1 (if only a private link), 2 or 3 (if limiter and loopback) */
+
+protected:
+ void set_num_links_per_node(unsigned int num) { num_links_per_node_ = num; }
+ resource::LinkImpl* get_uplink_from(unsigned int position) const { return private_links_.at(position).first; }
+ resource::LinkImpl* get_downlink_to(unsigned int position) const { return private_links_.at(position).second; }