Lumiera  0.pre.03
»edit your freedom«
OwnUniqueAdapter< FAC > Class Template Reference

#include "lib/allocator-handle.hpp"

Description

template<class FAC>
class lib::allo::OwnUniqueAdapter< FAC >

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)
 

Member Function Documentation

◆ dispose()

static void dispose ( TY *  elm)
inlinestaticprivate
Parameters
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:
+ Inheritance diagram for OwnUniqueAdapter< FAC >:
+ Collaboration diagram for OwnUniqueAdapter< FAC >:

The documentation for this class was generated from the following file: