Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/allocator-handle.hpp"
Adapter to use a generic factory FAC for creating managed object instances with unique ownership.
Generated objects are attached to a std::unique_ptr
handle, which enforces scoped ownership and destroys automatically. The factory can either be stateless (≙monostate) or tied to a distinct, statefull allocator or manager backend. In the latter case, this adapter must be created with appropriate wiring and each generated unique_ptr
handle will also carry a back-reference to the manager instance.
Definition at line 223 of file allocator-handle.hpp.
Public Member Functions | |
OwnUniqueAdapter (FAC const &factory) | |
template<class TY , typename... ARGS> | |
auto | make_unique (ARGS &&...args) |
Factory function: generate object with scoped ownership and automated clean-up. | |
Classes | |
struct | StatefulDeleter |
< More... | |
Static Private Member Functions | |
template<typename TY > | |
static void | dispose (TY *elm) |
|
inlinestaticprivate |
elm |
callback for unique_ptr using stateless FAC
Definition at line 228 of file allocator-handle.hpp.
Referenced by OwnUniqueAdapter< FAC >::make_unique().