X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f368403c7b31807751cbc287deeb4d92e90070cd..91fe7904c884b2d0f5e7408d6e9d1d99886bd365:/src/instr/instr_paje_types.hpp diff --git a/src/instr/instr_paje_types.hpp b/src/instr/instr_paje_types.hpp index b30eb760bc..0961d6e110 100644 --- a/src/instr/instr_paje_types.hpp +++ b/src/instr/instr_paje_types.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. */ @@ -26,11 +26,16 @@ class Type { std::map, std::less<>> children_; Container* issuer_ = nullptr; + static xbt::signal on_creation; + protected: Container* get_issuer() const { return issuer_; } public: - static xbt::signal on_creation; + static void on_creation_cb(const std::function& cb) + { + on_creation.connect(cb); + } Type(PajeEventType event_type, const std::string& name, const std::string& alias, const std::string& color, Type* parent); @@ -94,8 +99,13 @@ public: }; class LinkType : public ValueType { -public: static xbt::signal on_creation; + +public: + static void on_creation_cb(const std::function& cb) + { + on_creation.connect(cb); + } LinkType(const std::string& name, const Type* source, const Type* dest, const std::string& alias, Type* parent) : ValueType(PajeEventType::DefineLinkType, name, alias, parent) {