Inheritance Graph
graph BT
RegistryHandleHolder
click RegistryHandleHolder "classUtil_1_1RegistryHandleHolder"
Description
Safe storage for a RegistryHandle .
By storing a handle that is obtained by registering an element at a Registry in an instance of this holder class, the registration of the element is automatically canceled when the holder is destroyed. This class can be used to apply the Resource Acquisition Is Initialization (RAII) idiom for an registered element.
Parameters
- handle_t
- Type of the handle stored inside the holder
Author: Benjamin Eikel
Date: 2013-11-26
Public Functions
Documentation
function
Util::RegistryHandleHolder::RegistryHandleHolder
Register an element at a registry by calling the given function. The handle will be stored inside this holder.
Parameters
- registerFunction
- A function without parameters that registers an element and returns a handle for the registered element
- unregisterFunction
- A function that receives a handle for an registered element and cancels the registration of that element
Defined in Util/RegistryHelper.h:52
function
Util::RegistryHandleHolder::~RegistryHandleHolder
Cancel the registration of an element by calling the stored function with the stored handle as parameter.
Defined in Util/RegistryHelper.h:61
function
Util::RegistryHandleHolder::RegistryHandleHolder
Defined in Util/RegistryHelper.h:64
function
Util::RegistryHandleHolder::RegistryHandleHolder
Defined in Util/RegistryHelper.h:65
function
Util::RegistryHandleHolder::operator=
Defined in Util/RegistryHelper.h:66
function
Util::RegistryHandleHolder::operator=
Defined in Util/RegistryHelper.h:67