X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f01052cf1a094dd5df8869e4b26431b1efb6abb0..f9b13d923d31bb0336aeeaab6d5b7ba33812f3f7:/src/instr/instr_paje_containers.hpp diff --git a/src/instr/instr_paje_containers.hpp b/src/instr/instr_paje_containers.hpp index 8ce3d7f3e9..06e6219cc2 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-2022. 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. */ @@ -30,10 +30,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;