Base class for objects with auto-disconnection. More...
|trackable (const trackable& src)|
|trackable&||operator= (const trackable& src)|
|void||add_destroy_notify_callback (void* data, func_destroy_notify func) const|
|Add a callback that is executed (notified) when the trackable object is detroyed. |
|void||remove_destroy_notify_callback (void* data) const|
|Remove a callback previously installed with add_destroy_notify_callback(). |
|Execute and remove all previously installed callbacks. |
Base class for objects with auto-disconnection.
trackable must be inherited when objects shall automatically invalidate slots referring to them on destruction. A slot built from a member function of a trackable derived type installs a callback that is invoked when the trackable object is destroyed or overwritten.
notify_callbacks() invokes and removes all previously installed callbacks and can therefore be used to disconnect from all signals.
Note that there is no virtual destructor. Don't use
trackable* as pointer type for managing your data or the destructors of your derived types won't be called when deleting your objects.
|void sigc::trackable::add_destroy_notify_callback||(||void *||data,|
Add a callback that is executed (notified) when the trackable object is detroyed.
|data||Passed into func upon notification.|
|func||Callback executed upon destruction of the object.|