- /** @brief Add a callback fired when a Disk's state changes */
- static void on_state_change_cb(const std::function<void(Disk const&)>& cb) { on_state_change.connect(cb); }
+ /** @brief Add a callback fired when this specific Disk is destroyed */
+ void on_this_destruction_cb(const std::function<void(Disk const&)>& cb) { on_this_destruction.connect(cb); }
+ /** @brief \static Add a callback fired when any Disk is turned on or off */
+ static void on_onoff_cb(const std::function<void(Disk const&)>& 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<void(Disk const&)>& 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<void(Disk const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }