X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4929b7f325bed62b338613c63af15c75a185effe..39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f:/src/instr/instr_paje_containers.hpp diff --git a/src/instr/instr_paje_containers.hpp b/src/instr/instr_paje_containers.hpp index ec2930d622..3ab8fe8579 100644 --- a/src/instr/instr_paje_containers.hpp +++ b/src/instr/instr_paje_containers.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -17,12 +17,18 @@ class StateType; class VariableType; class Container { + static Container* root_container_; + static std::map> all_containers_; + long long int id_; std::string name_; /* Unique name of this container */ +protected: + static void set_root(Container* root) { root_container_ = root; } + public: - static xbt::signal on_creation; - static xbt::signal on_destruction; + static xbt::signal on_creation; + static xbt::signal on_destruction; explicit Container(const std::string& name, const std::string& type_name, Container* father); Container(const Container&) = delete; @@ -31,7 +37,7 @@ public: Type* type_; /* Type of this container */ Container* father_; - std::map children_; + std::map> children_; static Container* by_name_or_null(const std::string& name); static Container* by_name(const std::string& name); @@ -44,7 +50,7 @@ public: LinkType* get_link(const std::string& name); VariableType* get_variable(const std::string& name); void create_child(const std::string& name, const std::string& type_name); - static Container* get_root(); + static Container* get_root() { return root_container_; } }; class NetZoneContainer : public Container {