X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7ef49c428ab0209965a09a36ab28b59789aaa4b5..b87fc0829538ec066fd077e6c30ee6270b8abd78:/include/simgrid/s4u/NetZone.hpp diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index cb9d1ee3c9..0f50b37606 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -38,13 +38,13 @@ XBT_PUBLIC_CLASS NetZone protected: friend simgrid::kernel::routing::NetZoneImpl; - explicit NetZone(NetZone * father, const char* name); + explicit NetZone(NetZone * father, std::string name); virtual ~NetZone(); public: /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */ virtual void seal(); - char* getCname(); + const char* getCname(); NetZone* getFather(); std::vector* getChildren(); // Sub netzones @@ -71,13 +71,16 @@ public: static simgrid::xbt::signal onSeal; protected: - std::vector - vertices_; // our content, as known to our graph routing algorithm (maps vertexId -> vertex) + unsigned int getTableSize() { return vertices_.size(); } + std::vector getVertices() { return vertices_; } private: + // our content, as known to our graph routing algorithm (maps vertexId -> vertex) + std::vector vertices_; + std::unordered_map properties_; NetZone* father_ = nullptr; - char* name_ = nullptr; + std::string name_; bool sealed_ = false; // We cannot add more content when sealed