X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/237fd22b56db7d1c67360c37559ce3aab16a002d..9afa0d0db01da2ae64e48fb594cc87c186dde192:/src/instr/instr_paje_containers.hpp diff --git a/src/instr/instr_paje_containers.hpp b/src/instr/instr_paje_containers.hpp index 8ce3d7f3e9..957d4981ef 100644 --- a/src/instr/instr_paje_containers.hpp +++ b/src/instr/instr_paje_containers.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2023. 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. */ @@ -9,8 +9,7 @@ #include "src/instr/instr_private.hpp" #include -namespace simgrid { -namespace instr { +namespace simgrid::instr { class Type; class LinkType; class StateType; @@ -30,10 +29,14 @@ class Container { protected: static void set_root(Container* root) { root_container_ = root; } -public: +private: static xbt::signal on_creation; static xbt::signal on_destruction; +public: + static void on_creation_cb(const std::function& cb) { on_creation.connect(cb); } + static void on_destruction_cb(const std::function& cb) { on_destruction.connect(cb); } + explicit Container(const std::string& name, const std::string& type_name, Container* parent); Container(const Container&) = delete; Container& operator=(const Container&) = delete; @@ -71,6 +74,5 @@ class HostContainer : public Container { public: HostContainer(s4u::Host const& host, NetZoneContainer* parent); }; -} // namespace instr -} // namespace simgrid +} // namespace simgrid::instr #endif