X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/230f14e9e54194231417a6afe68983b67693ed6d..7bcd68411f827eb384b7444ceac6e62cd7c11b42:/include/simgrid/s4u/Comm.hpp diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index 167f70ca7a..2f07115b35 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -41,7 +41,9 @@ class XBT_PUBLIC Comm : public Activity_T { protected: static xbt::signal on_send; + xbt::signal on_this_send; static xbt::signal on_recv; + xbt::signal on_this_recv; inline static xbt::signal on_start; xbt::signal on_this_start; @@ -65,8 +67,12 @@ protected: public: /*! \static Add a callback fired when the send of any Comm is posted */ static void on_send_cb(const std::function& cb) { on_send.connect(cb); } + /*! Add a callback fired when the send of this specific Comm is posted */ + void on_this_send_cb(const std::function& cb) { on_send.connect(cb); } /*! \static Add a callback fired when the recv of any Comm is posted */ static void on_recv_cb(const std::function& cb) { on_recv.connect(cb); } + /*! Add a callback fired when the recv of this specific Comm is posted */ + void on_this_recv_cb(const std::function& cb) { on_this_recv.connect(cb); } /*! \static Add a callback fired when any Comm starts */ static void on_start_cb(const std::function& cb) { on_start.connect(cb); } /*! Add a callback fired when this specific Comm starts */