X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7dbf98c9905d9281223f93d53b0038cc6ea9a1e..cfb3987654b857620ba388fab9883a095debeb72:/include/simgrid/s4u/Disk.hpp diff --git a/include/simgrid/s4u/Disk.hpp b/include/simgrid/s4u/Disk.hpp index 46fc2f72e3..eec006c2f6 100644 --- a/include/simgrid/s4u/Disk.hpp +++ b/include/simgrid/s4u/Disk.hpp @@ -133,23 +133,35 @@ public: Disk* seal(); /* The signals */ - /** @brief Add a callback fired when a new Disk is created */ + /** @brief \static Add a callback fired when a new Disk is created */ static void on_creation_cb(const std::function& cb) { on_creation.connect(cb); } - /** @brief Add a callback fired when any Disk is destroyed */ + /** @brief \static Add a callback fired when any Disk is destroyed */ static void on_destruction_cb(const std::function& cb) { on_destruction.connect(cb); } /** @brief Add a callback fired when this specific Disk is destroyed */ void on_this_destruction_cb(const std::function& cb) { on_this_destruction.connect(cb); } - /** @brief Add a callback fired when the state of any Disk changes */ - static void on_state_change_cb(const std::function& cb) { on_state_change.connect(cb); } - /** @brief Add a callback fired when the state of this specific Disk changes */ - void on_this_state_change_cb(const std::function& cb) { on_this_state_change.connect(cb); } + /** @brief \static Add a callback fired when any Disk is turned on or off */ + static void on_onoff_cb(const std::function& cb) + { + on_onoff.connect(cb); + } + /** @brief Add a callback fired when this specific Disk is turned on or off */ + void on_this_onoff_cb(const std::function& cb) + { + on_this_onoff.connect(cb); + } + + XBT_ATTRIB_DEPRECATED_v338("Please use on_onoff_cb() instead") static void on_state_change_cb( + const std::function& cb) + { + on_onoff.connect(cb); + } private: static xbt::signal on_creation; static xbt::signal on_destruction; xbt::signal on_this_destruction; - static xbt::signal on_state_change; - xbt::signal on_this_state_change; + static xbt::signal on_onoff; + xbt::signal on_this_onoff; }; } // namespace s4u