X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7f3eef41bb31d243caddaa36f1612cb0d0febfd8..c04075c49b6bc68df4f37240b4ac53e7a108abaa:/src/instr/instr_paje_events.hpp?ds=sidebyside diff --git a/src/instr/instr_paje_events.hpp b/src/instr/instr_paje_events.hpp index 17aab29eaa..10c3b3b2f7 100644 --- a/src/instr/instr_paje_events.hpp +++ b/src/instr/instr_paje_events.hpp @@ -46,10 +46,13 @@ inline std::ostream& operator<<(std::ostream& os, PajeEventType event) class PajeEvent { Container* container_; Type* type_; -public: 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); } + double timestamp_; PajeEventType eventType_; std::stringstream stream_; @@ -83,8 +86,10 @@ class StateEvent : public PajeEvent { #endif std::unique_ptr extra_; -public: static xbt::signal on_destruction; + +public: + static void on_destruction_cb(const std::function& cb) { on_destruction.connect(cb); } StateEvent(Container* container, Type* type, PajeEventType event_type, EntityValue* value, TIData* extra); ~StateEvent() override { on_destruction(*this); } bool has_extra() const { return extra_ != nullptr; }