Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
TypedAllocationManager::Slot< XOX > Struct Template Reference

#include "lib/typed-allocation-manager.hpp"

Description

template<class XOX>
struct lib::TypedAllocationManager::Slot< XOX >

a token representing a newly opened slot capable for holding an object of type XOX .

The receiver is responsible for

  • either calling releaseSlot
  • or building a smart-ptr / handle wired to the deleter function

Definition at line 134 of file typed-allocation-manager.hpp.

Public Attributes

void *const storage_
 pointer to the allocated storage with sizeof(XOX) bytes
 

Public Member Functions

shared_ptr< XOX > build (XOX *toTrack)
 build a refcounting smart-ptr, complete with back-link to the manager for de-allocation
 
Killer< XOX > const & getDeleter ()
 

Friends

class TypedAllocationManager
 

Protected Member Functions

 Slot (_TheManager *don, void *mem)
 

Additional Inherited Members

- Private Member Functions inherited from TypedAllocationManager::Killer< XOX >
void operator() (XOX *victim)
 
 Killer (_TheManager *m)
 

Constructor & Destructor Documentation

◆ Slot()

template<class XOX >
Slot ( _TheManager don,
void *  mem 
)
inlineprotected

Definition at line 157 of file typed-allocation-manager.hpp.

Member Function Documentation

◆ build()

template<class XOX >
shared_ptr< XOX > build ( XOX *  toTrack)
inline

build a refcounting smart-ptr, complete with back-link to the manager for de-allocation

Definition at line 145 of file typed-allocation-manager.hpp.

References TypedAllocationManager::Slot< XOX >::getDeleter().

+ Here is the call graph for this function:

◆ getDeleter()

template<class XOX >
Killer< XOX > const & getDeleter ( )
inline

Definition at line 151 of file typed-allocation-manager.hpp.

Referenced by TypedAllocationManager::Slot< XOX >::build().

+ Here is the caller graph for this function:

Member Data Documentation

◆ storage_

template<class XOX >
void* const storage_

pointer to the allocated storage with sizeof(XOX) bytes

Definition at line 139 of file typed-allocation-manager.hpp.

Friends And Related Symbol Documentation

◆ TypedAllocationManager

template<class XOX >
friend class TypedAllocationManager
friend

Definition at line 162 of file typed-allocation-manager.hpp.

+ Inheritance diagram for TypedAllocationManager::Slot< XOX >:
+ Collaboration diagram for TypedAllocationManager::Slot< XOX >:

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