![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/typed-allocation-manager.hpp"
Foundation for a custom allocation manager, tracking the created objects by smart-ptrs.
The public interface provides forwarding functions to invoke the ctor of the objects to be created, thereby placing them into the storage maintained by a low-level allocator or pooled storage manager. The created smart-ptr owns the new object and is wired internally to releaseSlot. Subclasses may also directly allocate and de-allocate such a (typed) storage slot.
Definition at line 93 of file typed-allocation-manager.hpp.
Classes | |
| class | Killer |
| opaque link to the manager, to be used by handles and smart-ptrs to trigger preconfigured destruction. More... | |
| struct | Slot |
| a token representing a newly opened slot capable for holding an object of type XOX . More... | |
Public Member Functions | |
| template<class XX > | |
| size_t | numSlots () const |
| template<class XX , typename... ARGS> | |
| shared_ptr< XX > | create (ARGS &&...args) |
Friends | |
| template<class > | |
| class | Killer |
| especially all Killers are entitled to desroyElement() | |
Protected Member Functions | |
| template<class XX > | |
| Slot< XX > | allocateSlot () |
| template<class XX > | |
| void | releaseSlot (void *entry) |
| template<class XX > | |
| void | destroyElement (XX *entry) |
Private Types | |
| typedef TypedAllocationManager | _TheManager |
Private Attributes | |
| lib::TypedCounter | allocCnt_ |
|
private |
Definition at line 95 of file typed-allocation-manager.hpp.
| size_t numSlots | ( | ) | const |
Definition at line 246 of file typed-allocation-manager.hpp.
References TypedAllocationManager::allocCnt_, and TypedCounter::get().
Referenced by PlacementIndex::Table::element_cnt(), CommandRegistry::instance_count(), and TypedAllocationManager_test::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 172 of file typed-allocation-manager.hpp.
Referenced by PlacementIndex::Table::addEntry(), CommandRegistry::createCloneImpl(), CommandRegistry::newCommandImpl(), TypedAllocationManager_test::run(), and PlacementIndex::Table::setupRoot().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 194 of file typed-allocation-manager.hpp.
References TypedAllocationManager::allocCnt_, and TypedCounter::inc().
Here is the call graph for this function:
|
inlineprotected |
Definition at line 205 of file typed-allocation-manager.hpp.
References TypedAllocationManager::allocCnt_, and TypedCounter::dec().
Here is the call graph for this function:
|
inlineprotected |
Definition at line 217 of file typed-allocation-manager.hpp.
References lumiera_error().
Referenced by TypedAllocationManager::Killer< XOX >::operator()().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 239 of file typed-allocation-manager.hpp.
Referenced by TypedAllocationManager::allocateSlot(), TypedAllocationManager::numSlots(), and TypedAllocationManager::releaseSlot().
|
friend |
especially all Killers are entitled to desroyElement()
Definition at line 235 of file typed-allocation-manager.hpp.
Collaboration diagram for TypedAllocationManager: