Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
Deletable is a virtual base class that can be derived from (usually with public virtual) to ensure an object has a vtable and a virtual destructor. More...
#include <objects.hh>
Inherits Rapicorn::VirtualTypeid.
Inherited by Rapicorn::Event, Rapicorn::Factory::WidgetTypeFactory [protected]
, Rapicorn::ReferenceCountable [virtual]
, and Rapicorn::ScreenWindow [virtual]
.
Classes | |
class | DeletionHook |
DeletionHook is the base implementation class for hooks which are hooked up into the deletion phase of a Rapicorn::Deletable. More... | |
Protected Member Functions | |
void | invoke_deletion_hooks () |
Invoke all deletion hooks installed on this deletable. |
Deletable is a virtual base class that can be derived from (usually with public virtual) to ensure an object has a vtable and a virtual destructor.
Classes derived from Deletable need to have a virtual destructor.
Also, it allows deletion hooks to be called during the objects destructor, by deriving from Rapicorn::Deletable::DeletionHook. No extra per-object space is consumed to allow deletion hooks, which makes Deletable a suitable base type for classes that may or may not need this feature (e.g. objects that can but often aren't used for signal handler connections).
Handlers can be registered with class instances that are called during instance deletion. This is most useful for automated memory keeping of custom resources attached to the lifetime of a particular instance.