![]() |
Lumiera 0.pre.04
»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.
Classes | |
| struct | StatefulDeleter |
| < More... | |
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. | |
Static Private Member Functions | |
| template<typename TY > | |
| static void | dispose (TY *elm) |
|
inline |
Definition at line 251 of file allocator-handle.hpp.
|
inlinestaticprivate |
| elm |
callback for unique_ptr using stateless FAC
Definition at line 228 of file allocator-handle.hpp.
Referenced by OwnUniqueAdapter< FAC >::make_unique().
Here is the caller graph for this function:
|
inline |
Factory function: generate object with scoped ownership and automated clean-up.
Definition at line 261 of file allocator-handle.hpp.
References OwnUniqueAdapter< FAC >::dispose().
Referenced by TestTracking_test::demonstrate_checkAllocator().
Here is the call graph for this function:
Here is the caller graph for this function:
Inheritance diagram for OwnUniqueAdapter< FAC >:
Collaboration diagram for OwnUniqueAdapter< FAC >: